mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-08 15:00:54 +03:00
Merge pull request #298 from Bios-Marcel/fix-demo-menu-item-states
Fix selected states for native window border related menu items
This commit is contained in:
@@ -750,8 +750,19 @@ class DemoFrame
|
|||||||
|
|
||||||
boolean supportsWindowDecorations = UIManager.getLookAndFeel()
|
boolean supportsWindowDecorations = UIManager.getLookAndFeel()
|
||||||
.getSupportsWindowDecorations() || FlatNativeWindowBorder.isSupported();
|
.getSupportsWindowDecorations() || FlatNativeWindowBorder.isSupported();
|
||||||
windowDecorationsCheckBoxMenuItem.setEnabled( supportsWindowDecorations && !JBRCustomDecorations.isSupported() );
|
|
||||||
menuBarEmbeddedCheckBoxMenuItem.setEnabled( supportsWindowDecorations );
|
// If the JetBrainsRuntime is used, it forces the use of it's own custom
|
||||||
|
// window decoration, meaning we can't use our own.
|
||||||
|
if( !supportsWindowDecorations || JBRCustomDecorations.isSupported() ) {
|
||||||
|
windowDecorationsCheckBoxMenuItem.setEnabled( false );
|
||||||
|
windowDecorationsCheckBoxMenuItem.setSelected( false );
|
||||||
|
windowDecorationsCheckBoxMenuItem.setToolTipText( "Not supported on your system." );
|
||||||
|
}
|
||||||
|
if( !supportsWindowDecorations ) {
|
||||||
|
menuBarEmbeddedCheckBoxMenuItem.setEnabled( false );
|
||||||
|
menuBarEmbeddedCheckBoxMenuItem.setSelected( false );
|
||||||
|
menuBarEmbeddedCheckBoxMenuItem.setToolTipText( "Not supported on your system." );
|
||||||
|
}
|
||||||
|
|
||||||
// remove contentPanel bottom insets
|
// remove contentPanel bottom insets
|
||||||
MigLayout layout = (MigLayout) contentPanel.getLayout();
|
MigLayout layout = (MigLayout) contentPanel.getLayout();
|
||||||
|
|||||||
Reference in New Issue
Block a user