Merge pull request #1616 from SiboVG/fix-icons-click
Fix pressed icon size of IconButton
This commit is contained in:
commit
75b10e9f76
@ -38,6 +38,13 @@ public class IconButton extends SelectColorButton {
|
|||||||
setIconTextGap(ICON_GAP);
|
setIconTextGap(ICON_GAP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setIcon(Icon defaultIcon) {
|
||||||
|
super.setIcon(defaultIcon);
|
||||||
|
// There is a bug where the normal override of the pressed icon does not work, so we have to assign it here.
|
||||||
|
setPressedIcon(Icons.getScaledIcon(defaultIcon, ICON_SCALE));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Icon getIcon() {
|
public Icon getIcon() {
|
||||||
return Icons.getScaledIcon(super.getIcon(), IconButton.ICON_SCALE);
|
return Icons.getScaledIcon(super.getIcon(), IconButton.ICON_SCALE);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user