mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-06 22:10:54 +03:00
Button: fixed help button styling in IntelliJ platform themes
This commit is contained in:
@@ -7,6 +7,7 @@ FlatLaf Change Log
|
||||
- Button: Optionally support gradient borders, gradient backgrounds and shadows
|
||||
for improved compatibility with IntelliJ platform themes (e.g. for Vuesion,
|
||||
Spacegray and Material Design Dark themes).
|
||||
- Button: Fixed help button styling in IntelliJ platform themes.
|
||||
|
||||
|
||||
## 0.20
|
||||
|
||||
@@ -143,6 +143,20 @@ public class IntelliJTheme
|
||||
applyColorPalette( defaults );
|
||||
applyCheckBoxColors( defaults );
|
||||
|
||||
// IDEA uses a SVG icon for the help button, but paints the background with Button.startBackground and Button.endBackground
|
||||
Object helpButtonBackground = defaults.get( "Button.startBackground" );
|
||||
Object helpButtonBorderColor = defaults.get( "Button.startBorderColor" );
|
||||
if( helpButtonBackground == null )
|
||||
helpButtonBackground = defaults.get( "Button.background" );
|
||||
if( helpButtonBorderColor == null )
|
||||
helpButtonBorderColor = defaults.get( "Button.borderColor" );
|
||||
defaults.put( "HelpButton.background", helpButtonBackground );
|
||||
defaults.put( "HelpButton.borderColor", helpButtonBorderColor );
|
||||
defaults.put( "HelpButton.disabledBackground", defaults.get( "Panel.background" ) );
|
||||
defaults.put( "HelpButton.disabledBorderColor", defaults.get( "Button.disabledBorderColor" ) );
|
||||
defaults.put( "HelpButton.focusedBorderColor", defaults.get( "Button.focusedBorderColor" ) );
|
||||
defaults.put( "HelpButton.focusedBackground", defaults.get( "Button.focusedBackground" ) );
|
||||
|
||||
// IDEA uses TextField.background for editable ComboBox and Spinner
|
||||
defaults.put( "ComboBox.editableBackground", defaults.get( "TextField.background" ) );
|
||||
defaults.put( "Spinner.background", defaults.get( "TextField.background" ) );
|
||||
|
||||
@@ -25,8 +25,6 @@ Button.focusedBackground=null
|
||||
Button.default.background=#4A86C7
|
||||
Button.default.foreground=#f0f0f0
|
||||
Button.default.focusedBackground=null
|
||||
Button.default.hoverBackground=#5B91CC
|
||||
Button.default.pressedBackground=#6E9ED2
|
||||
Button.default.borderColor=#3167ad
|
||||
Button.default.hoverBorderColor=#a8cef6
|
||||
Button.default.focusedBorderColor=#a8cef6
|
||||
|
||||
@@ -19,5 +19,7 @@
|
||||
Button.hoverBorderColor=null
|
||||
Button.default.hoverBorderColor=null
|
||||
|
||||
Button.default.hoverBackground=@buttonHoverBackground
|
||||
Button.default.pressedBackground=@buttonPressedBackground
|
||||
|
||||
#---- HelpButton ----
|
||||
|
||||
HelpButton.hoverBorderColor=null
|
||||
|
||||
Reference in New Issue
Block a user