From 8d80176a79dffce83ecb18f29ecffad15fe9c8b3 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 28 Jun 2020 00:28:02 +0200 Subject: [PATCH] IntelliJ Themes: fixed menu bar and menu item margins in all Material UI Lite themes --- CHANGELOG.md | 2 ++ .../java/com/formdev/flatlaf/IntelliJTheme.java | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8824876b..3991bea9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ FlatLaf Change Log - Fixed/improved vertical position of text when scaled on HiDPI screens on Windows. - IntelliJ Themes: Updated Gradianto Themes. +- IntelliJ Themes: Fixed menu bar and menu item margins in all Material UI Lite + themes. ## 0.36 diff --git a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java index c4a5ac3a..bcb7ffc5 100644 --- a/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java +++ b/flatlaf-core/src/main/java/com/formdev/flatlaf/IntelliJTheme.java @@ -481,6 +481,19 @@ public class IntelliJTheme // Link uiKeyMapping.put( "Link.activeForeground", "Component.linkColor" ); + // Menu + uiKeyMapping.put( "Menu.border", "Menu.margin" ); + uiKeyMapping.put( "MenuItem.border", "MenuItem.margin" ); + uiKeyCopying.put( "CheckBoxMenuItem.margin", "MenuItem.margin" ); + uiKeyCopying.put( "RadioButtonMenuItem.margin", "MenuItem.margin" ); + uiKeyMapping.put( "PopupMenu.border", "PopupMenu.borderInsets" ); + + // IDEA uses List.selectionBackground also for menu selection + uiKeyCopying.put( "Menu.selectionBackground", "List.selectionBackground" ); + uiKeyCopying.put( "MenuItem.selectionBackground", "List.selectionBackground" ); + uiKeyCopying.put( "CheckBoxMenuItem.selectionBackground", "List.selectionBackground" ); + uiKeyCopying.put( "RadioButtonMenuItem.selectionBackground", "List.selectionBackground" ); + // ProgressBar uiKeyMapping.put( "ProgressBar.background", "" ); // ignore uiKeyMapping.put( "ProgressBar.foreground", "" ); // ignore