mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2026-02-11 06:27:13 -06:00
Window decorations:
- fixed updating of client property `FULL_WINDOW_CONTENT_BUTTONS_BOUNDS` when resizing window - fixed title bar buttons placeholder debug painting
This commit is contained in:
@@ -359,11 +359,14 @@ public class FlatTitlePane
|
||||
buttonPanel.add( maximizeButton );
|
||||
buttonPanel.add( restoreButton );
|
||||
}
|
||||
buttonPanel.addComponentListener( new ComponentAdapter() {
|
||||
buttonPanel.add( closeButton );
|
||||
|
||||
ComponentListener l = new ComponentAdapter() {
|
||||
@Override public void componentResized( ComponentEvent e ) { updateFullWindowContentButtonsBoundsProperty(); }
|
||||
@Override public void componentMoved( ComponentEvent e ) { updateFullWindowContentButtonsBoundsProperty(); }
|
||||
} );
|
||||
buttonPanel.add( closeButton );
|
||||
};
|
||||
buttonPanel.addComponentListener( l );
|
||||
addComponentListener( l );
|
||||
}
|
||||
|
||||
protected JButton createButton( String iconKey, String accessibleName, ActionListener action ) {
|
||||
|
||||
@@ -209,9 +209,11 @@ class FullWindowContentSupport
|
||||
g.drawRect( r.x, r.y, r.width - 1, r.height - 1 );
|
||||
|
||||
// draw diagonal cross
|
||||
int x2 = r.x + r.width - 1;
|
||||
int y2 = r.y + r.height - 1;
|
||||
Object[] oldRenderingHints = FlatUIUtils.setRenderingHints( g );
|
||||
g.drawLine( r.x, r.y, r.width - 1, r.height - 1 );
|
||||
g.drawLine( r.x, r.height - 1, r.width - 1, r.y );
|
||||
g.drawLine( r.x, r.y, x2, y2 );
|
||||
g.drawLine( r.x, y2, x2, r.y );
|
||||
FlatUIUtils.resetRenderingHints( g, oldRenderingHints );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user