mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-09 08:15:09 +03:00
fixed possible exception in FlatUIUtils.resetRenderingHints() (issue #575)
This commit is contained in:
@@ -12,6 +12,7 @@ FlatLaf Change Log
|
|||||||
|
|
||||||
- Fixed missing UI value `MenuItem.acceleratorDelimiter` on macOS. (was `null`,
|
- Fixed missing UI value `MenuItem.acceleratorDelimiter` on macOS. (was `null`,
|
||||||
is now an empty string)
|
is now an empty string)
|
||||||
|
- Fixed possible exception in `FlatUIUtils.resetRenderingHints()`. (issue #575)
|
||||||
|
|
||||||
|
|
||||||
## 2.4
|
## 2.4
|
||||||
|
|||||||
@@ -352,8 +352,10 @@ public class FlatUIUtils
|
|||||||
*/
|
*/
|
||||||
public static void resetRenderingHints( Graphics g, Object[] oldRenderingHints ) {
|
public static void resetRenderingHints( Graphics g, Object[] oldRenderingHints ) {
|
||||||
Graphics2D g2 = (Graphics2D) g;
|
Graphics2D g2 = (Graphics2D) g;
|
||||||
g2.setRenderingHint( RenderingHints.KEY_ANTIALIASING, oldRenderingHints[0] );
|
if( oldRenderingHints[0] != null )
|
||||||
g2.setRenderingHint( RenderingHints.KEY_STROKE_CONTROL, oldRenderingHints[1] );
|
g2.setRenderingHint( RenderingHints.KEY_ANTIALIASING, oldRenderingHints[0] );
|
||||||
|
if( oldRenderingHints[1] != null )
|
||||||
|
g2.setRenderingHint( RenderingHints.KEY_STROKE_CONTROL, oldRenderingHints[1] );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user