mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
+ scale(int):int method
This commit is contained in:
@@ -80,12 +80,12 @@ public class EmptyIcon implements Icon, ScalableIcon {
|
||||
|
||||
@Override
|
||||
public int getIconWidth() {
|
||||
return scale == 1f ? width : (int) (width * scale);
|
||||
return scale(width);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconHeight() {
|
||||
return scale == 1f ? height : (int) (height * scale);
|
||||
return scale(height);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -117,6 +117,10 @@ public class EmptyIcon implements Icon, ScalableIcon {
|
||||
return new EmptyIconUIResource(this);
|
||||
}
|
||||
|
||||
protected int scale(int n) {
|
||||
return scale == 1f ? n : (int) (n * scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon scale(float scaleFactor) {
|
||||
if (scaleFactor != scale) {
|
||||
|
||||
Reference in New Issue
Block a user