mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Performance changes will have to wait until UI issues are cleared up. Reverted.
This commit is contained in:
@@ -216,9 +216,9 @@ public class FLabel extends JLabel {
|
|||||||
// Mouse event handler
|
// Mouse event handler
|
||||||
private final MouseAdapter madEvents = new MouseAdapter() {
|
private final MouseAdapter madEvents = new MouseAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void mouseEntered(MouseEvent e) { hovered = true; repaint(FLabel.this.getX(), FLabel.this.getY(), FLabel.this.getWidth(), FLabel.this.getHeight()); }
|
public void mouseEntered(MouseEvent e) { hovered = true; repaint(); }
|
||||||
@Override
|
@Override
|
||||||
public void mouseExited(MouseEvent e) { hovered = false; repaint(FLabel.this.getX(), FLabel.this.getY(), FLabel.this.getWidth(), FLabel.this.getHeight()); }
|
public void mouseExited(MouseEvent e) { hovered = false; repaint(); }
|
||||||
@Override
|
@Override
|
||||||
public void mouseClicked(MouseEvent e) {
|
public void mouseClicked(MouseEvent e) {
|
||||||
if (cmdClick != null) { cmdClick.execute(); }
|
if (cmdClick != null) { cmdClick.execute(); }
|
||||||
@@ -241,7 +241,7 @@ public class FLabel extends JLabel {
|
|||||||
// Must be public.
|
// Must be public.
|
||||||
public void setSelected(boolean b0) {
|
public void setSelected(boolean b0) {
|
||||||
this.selected = b0;
|
this.selected = b0;
|
||||||
repaint(this.getX(), this.getY(), this.getWidth(), this.getHeight());
|
repaint();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Sets alpha if icon is in background.
|
/** Sets alpha if icon is in background.
|
||||||
@@ -364,7 +364,7 @@ public class FLabel extends JLabel {
|
|||||||
switch (fontStyle) {
|
switch (fontStyle) {
|
||||||
case Font.BOLD:
|
case Font.BOLD:
|
||||||
setFont(FSkin.getBoldFont((int) (ref * fontScaleFactor)));
|
setFont(FSkin.getBoldFont((int) (ref * fontScaleFactor)));
|
||||||
repaint(FLabel.this.getX(), FLabel.this.getY(), FLabel.this.getWidth(), FLabel.this.getHeight());
|
repaint();
|
||||||
break;
|
break;
|
||||||
case Font.ITALIC:
|
case Font.ITALIC:
|
||||||
setFont(FSkin.getItalicFont((int) (ref * fontScaleFactor)));
|
setFont(FSkin.getItalicFont((int) (ref * fontScaleFactor)));
|
||||||
|
|||||||
Reference in New Issue
Block a user