mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 14:00:55 +03:00
FlatLaf window decorations: minimize and maximize icons were not shown for custom scale factors less than 100% (e.g. `-Dflatlaf.uiScale=75%) (issue #951)
This commit is contained in:
@@ -19,6 +19,9 @@ FlatLaf Change Log
|
||||
- FileChooser: Improved performance when navigating to large directories with
|
||||
thousands of files. (issue #953)
|
||||
- PopupFactory: Fixed NPE on Windows 10 when `owner` is `null`. (issue #952)
|
||||
- FlatLaf window decorations: Minimize and maximize icons were not shown for
|
||||
custom scale factors less than 100% (e.g. `-Dflatlaf.uiScale=75%`). (issue
|
||||
#951)
|
||||
|
||||
|
||||
## 3.5.4
|
||||
|
||||
@@ -63,7 +63,7 @@ public class FlatWindowCloseIcon
|
||||
int iy = y + ((height - iwh) / 2);
|
||||
int ix2 = ix + iwh - 1;
|
||||
int iy2 = iy + iwh - 1;
|
||||
float thickness = SystemInfo.isWindows_11_orLater ? (float) scaleFactor : (int) scaleFactor;
|
||||
float thickness = Math.max( SystemInfo.isWindows_11_orLater ? (float) scaleFactor : (int) scaleFactor, 1 );
|
||||
|
||||
Path2D path = new Path2D.Float( Path2D.WIND_EVEN_ODD, 4 );
|
||||
path.moveTo( ix, iy );
|
||||
|
||||
@@ -38,7 +38,7 @@ public class FlatWindowIconifyIcon
|
||||
@Override
|
||||
protected void paintIconAt1x( Graphics2D g, int x, int y, int width, int height, double scaleFactor ) {
|
||||
int iw = (int) (getSymbolHeight() * scaleFactor);
|
||||
int ih = (int) scaleFactor;
|
||||
int ih = Math.max( (int) scaleFactor, 1 );
|
||||
int ix = x + ((width - iw) / 2);
|
||||
int iy = y + ((height - ih) / 2);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ public class FlatWindowMaximizeIcon
|
||||
int iwh = (int) (getSymbolHeight() * scaleFactor);
|
||||
int ix = x + ((width - iwh) / 2);
|
||||
int iy = y + ((height - iwh) / 2);
|
||||
float thickness = SystemInfo.isWindows_11_orLater ? (float) scaleFactor : (int) scaleFactor;
|
||||
float thickness = Math.max( SystemInfo.isWindows_11_orLater ? (float) scaleFactor : (int) scaleFactor, 1 );
|
||||
int arc = Math.max( (int) (1.5 * scaleFactor), 2 );
|
||||
|
||||
g.fill( SystemInfo.isWindows_11_orLater
|
||||
|
||||
@@ -45,7 +45,7 @@ public class FlatWindowRestoreIcon
|
||||
int iwh = (int) (getSymbolHeight() * scaleFactor);
|
||||
int ix = x + ((width - iwh) / 2);
|
||||
int iy = y + ((height - iwh) / 2);
|
||||
float thickness = SystemInfo.isWindows_11_orLater ? (float) scaleFactor : (int) scaleFactor;
|
||||
float thickness = Math.max( SystemInfo.isWindows_11_orLater ? (float) scaleFactor : (int) scaleFactor, 1 );
|
||||
int arc = Math.max( (int) (1.5 * scaleFactor), 2 );
|
||||
int arcOuter = (int) (arc + (1.5 * scaleFactor));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user