Linux: rounded iconify/maximize/close buttons if using FlatLaf window decorations (issue #821)

This commit is contained in:
Karl Tauber
2025-02-18 13:10:55 +01:00
parent 411a2f6d29
commit ae4037ee82
21 changed files with 500 additions and 88 deletions

View File

@@ -45,8 +45,86 @@
#---- TitlePane ----
- TitlePane.buttonArc 0
+ TitlePane.buttonArc 999
+ TitlePane.buttonBackground #3c3f41 HSL 204 4 25 com.formdev.flatlaf.util.DerivedColor [UI] lighten(5% autoInverse)
- TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
+ TitlePane.buttonInsets 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
- TitlePane.buttonMaximizedHeight 22
+ TitlePane.buttonMaximizedHeight -1
- TitlePane.buttonPressedBackground #3f4144 HSL 216 4 26 com.formdev.flatlaf.util.DerivedColor [UI] lighten(6% autoInverse)
+ TitlePane.buttonPressedBackground #55585c HSL 214 4 35 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse)
- TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
+ TitlePane.buttonSize 26,26 javax.swing.plaf.DimensionUIResource [UI]
- TitlePane.buttonSymbolHeight 10
+ TitlePane.buttonSymbolHeight 8
- TitlePane.buttonsFillVertically true
+ TitlePane.buttonsFillVertically false
- TitlePane.buttonsGap 0
+ TitlePane.buttonsGap 8
- TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
+ TitlePane.buttonsMargins 4,4,4,4 javax.swing.plaf.InsetsUIResource [UI]
+ TitlePane.closeBackground #3c3f41 HSL 204 4 25 com.formdev.flatlaf.util.DerivedColor [UI] lighten(5% autoInverse)
- TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
+ TitlePane.closeHoverBackground #484c4f HSL 206 5 30 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse)
- TitlePane.closeHoverForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
+ TitlePane.closeHoverForeground #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
- TitlePane.closeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
+ TitlePane.closeIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
- TitlePane.closePressedBackground #c42b1ce6 90% HSLA 5 75 44 90 javax.swing.plaf.ColorUIResource [UI]
+ TitlePane.closePressedBackground #55585c HSL 214 4 35 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse)
- TitlePane.closePressedForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
+ TitlePane.closePressedForeground #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
- TitlePane.iconifyIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
+ TitlePane.iconifyIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
- TitlePane.maximizeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
+ TitlePane.maximizeIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
- TitlePane.restoreIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
+ TitlePane.restoreIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
+ TitlePane.small.buttonInsets 1,1,1,1 javax.swing.plaf.InsetsUIResource [UI]
- TitlePane.small.buttonSize 30,20 javax.swing.plaf.DimensionUIResource [UI]
+ TitlePane.small.buttonSize 20,20 javax.swing.plaf.DimensionUIResource [UI]
- TitlePane.small.buttonSymbolHeight 8
+ TitlePane.small.buttonSymbolHeight 6
+ TitlePane.small.buttonsGap 4
+ TitlePane.small.buttonsMargins 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
- TitlePane.small.closeIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
+ TitlePane.small.closeIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
- TitlePane.small.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI]
+ TitlePane.small.font [active] Liberation Sans plain 14 javax.swing.plaf.FontUIResource [UI]
- TitlePane.small.iconifyIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
+ TitlePane.small.iconifyIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
- TitlePane.small.maximizeIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
+ TitlePane.small.maximizeIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
- TitlePane.small.restoreIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
+ TitlePane.small.restoreIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
- defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ defaultFont Liberation Sans plain 15 javax.swing.plaf.FontUIResource [UI]

View File

@@ -1242,12 +1242,17 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
#---- TitlePane ----
TitlePane.background #303234 HSL 210 4 20 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonHoverBackground #55585c HSL 214 4 35 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse)
TitlePane.buttonArc 0
TitlePane.buttonHoverBackground #484c4f HSL 206 5 30 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse)
TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
TitlePane.buttonMaximizedHeight 22
TitlePane.buttonMinimumWidth 30
TitlePane.buttonPressedBackground #484c4f HSL 206 5 30 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse)
TitlePane.buttonPressedBackground #3f4144 HSL 216 4 26 com.formdev.flatlaf.util.DerivedColor [UI] lighten(6% autoInverse)
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
TitlePane.buttonSymbolHeight 10
TitlePane.buttonsFillVertically true
TitlePane.buttonsGap 0
TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
TitlePane.centerTitle false
TitlePane.centerTitleIfMenuBarEmbedded true
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]

View File

@@ -45,8 +45,89 @@
#---- TitlePane ----
- TitlePane.buttonArc 0
+ TitlePane.buttonArc 999
+ TitlePane.buttonBackground #f2f2f2 HSL 0 0 95 com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse)
- TitlePane.buttonHoverBackground #f2f2f2 HSL 0 0 95 com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse)
+ TitlePane.buttonHoverBackground #e6e6e6 HSL 0 0 90 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse)
- TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
+ TitlePane.buttonInsets 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
- TitlePane.buttonMaximizedHeight 22
+ TitlePane.buttonMaximizedHeight -1
- TitlePane.buttonPressedBackground #f7f7f7 HSL 0 0 97 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse)
+ TitlePane.buttonPressedBackground #d9d9d9 HSL 0 0 85 com.formdev.flatlaf.util.DerivedColor [UI] darken(15% autoInverse)
- TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
+ TitlePane.buttonSize 26,26 javax.swing.plaf.DimensionUIResource [UI]
- TitlePane.buttonSymbolHeight 10
+ TitlePane.buttonSymbolHeight 8
- TitlePane.buttonsFillVertically true
+ TitlePane.buttonsFillVertically false
- TitlePane.buttonsGap 0
+ TitlePane.buttonsGap 8
- TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
+ TitlePane.buttonsMargins 4,4,4,4 javax.swing.plaf.InsetsUIResource [UI]
+ TitlePane.closeBackground #f2f2f2 HSL 0 0 95 com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse)
- TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
+ TitlePane.closeHoverBackground #e6e6e6 HSL 0 0 90 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse)
- TitlePane.closeHoverForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
+ TitlePane.closeHoverForeground #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
- TitlePane.closeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
+ TitlePane.closeIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
- TitlePane.closePressedBackground #c42b1ce6 90% HSLA 5 75 44 90 javax.swing.plaf.ColorUIResource [UI]
+ TitlePane.closePressedBackground #d9d9d9 HSL 0 0 85 com.formdev.flatlaf.util.DerivedColor [UI] darken(15% autoInverse)
- TitlePane.closePressedForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
+ TitlePane.closePressedForeground #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
- TitlePane.iconifyIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
+ TitlePane.iconifyIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
- TitlePane.maximizeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
+ TitlePane.maximizeIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
- TitlePane.restoreIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
+ TitlePane.restoreIcon [lazy] 26,26 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
+ TitlePane.small.buttonInsets 1,1,1,1 javax.swing.plaf.InsetsUIResource [UI]
- TitlePane.small.buttonSize 30,20 javax.swing.plaf.DimensionUIResource [UI]
+ TitlePane.small.buttonSize 20,20 javax.swing.plaf.DimensionUIResource [UI]
- TitlePane.small.buttonSymbolHeight 8
+ TitlePane.small.buttonSymbolHeight 6
+ TitlePane.small.buttonsGap 4
+ TitlePane.small.buttonsMargins 2,2,2,2 javax.swing.plaf.InsetsUIResource [UI]
- TitlePane.small.closeIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
+ TitlePane.small.closeIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
- TitlePane.small.font [active] Segoe UI plain 11 javax.swing.plaf.FontUIResource [UI]
+ TitlePane.small.font [active] Liberation Sans plain 14 javax.swing.plaf.FontUIResource [UI]
- TitlePane.small.iconifyIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
+ TitlePane.small.iconifyIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowIconifyIcon [UI]
- TitlePane.small.maximizeIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
+ TitlePane.small.maximizeIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowMaximizeIcon [UI]
- TitlePane.small.restoreIcon [lazy] 30,20 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
+ TitlePane.small.restoreIcon [lazy] 20,20 com.formdev.flatlaf.icons.FlatWindowRestoreIcon [UI]
- defaultFont Segoe UI plain 12 javax.swing.plaf.FontUIResource [UI]
+ defaultFont Liberation Sans plain 15 javax.swing.plaf.FontUIResource [UI]

View File

@@ -1247,12 +1247,17 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
#---- TitlePane ----
TitlePane.background #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonHoverBackground #e6e6e6 HSL 0 0 90 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse)
TitlePane.buttonArc 0
TitlePane.buttonHoverBackground #f2f2f2 HSL 0 0 95 com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse)
TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
TitlePane.buttonMaximizedHeight 22
TitlePane.buttonMinimumWidth 30
TitlePane.buttonPressedBackground #ebebeb HSL 0 0 92 com.formdev.flatlaf.util.DerivedColor [UI] darken(8% autoInverse)
TitlePane.buttonPressedBackground #f7f7f7 HSL 0 0 97 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse)
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
TitlePane.buttonSymbolHeight 10
TitlePane.buttonsFillVertically true
TitlePane.buttonsGap 0
TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
TitlePane.centerTitle false
TitlePane.centerTitleIfMenuBarEmbedded true
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]

View File

@@ -1252,12 +1252,17 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
#---- TitlePane ----
TitlePane.background #323232 HSL 0 0 20 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonHoverBackground #585858 HSL 0 0 35 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse)
TitlePane.buttonArc 0
TitlePane.buttonHoverBackground #4c4c4c HSL 0 0 30 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse)
TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
TitlePane.buttonMaximizedHeight 22
TitlePane.buttonMinimumWidth 30
TitlePane.buttonPressedBackground #4c4c4c HSL 0 0 30 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse)
TitlePane.buttonPressedBackground #414141 HSL 0 0 25 com.formdev.flatlaf.util.DerivedColor [UI] lighten(6% autoInverse)
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
TitlePane.buttonSymbolHeight 10
TitlePane.buttonsFillVertically true
TitlePane.buttonsGap 0
TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
TitlePane.centerTitle false
TitlePane.centerTitleIfMenuBarEmbedded true
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]

View File

@@ -1256,12 +1256,17 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
#---- TitlePane ----
TitlePane.background #ececec HSL 0 0 93 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonHoverBackground #d3d3d3 HSL 0 0 83 com.formdev.flatlaf.util.DerivedColor [UI] darken(10% autoInverse)
TitlePane.buttonArc 0
TitlePane.buttonHoverBackground #dfdfdf HSL 0 0 87 com.formdev.flatlaf.util.DerivedColor [UI] darken(5% autoInverse)
TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
TitlePane.buttonMaximizedHeight 22
TitlePane.buttonMinimumWidth 30
TitlePane.buttonPressedBackground #d8d8d8 HSL 0 0 85 com.formdev.flatlaf.util.DerivedColor [UI] darken(8% autoInverse)
TitlePane.buttonPressedBackground #e4e4e4 HSL 0 0 89 com.formdev.flatlaf.util.DerivedColor [UI] darken(3% autoInverse)
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
TitlePane.buttonSymbolHeight 10
TitlePane.buttonsFillVertically true
TitlePane.buttonsGap 0
TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
TitlePane.centerTitle false
TitlePane.centerTitleIfMenuBarEmbedded true
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]

View File

@@ -1293,17 +1293,34 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI
TitlePane.background #00ff00 HSL 120 100 50 javax.swing.plaf.ColorUIResource [UI]
TitlePane.borderColor #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonArc 0
TitlePane.buttonBackground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonForeground #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonHoverBackground #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonHoverForeground #00ff00 HSL 120 100 50 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonInactiveBackground #dddddd HSL 0 0 87 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonInactiveForeground #0000ff HSL 240 100 50 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonInsets 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
TitlePane.buttonMaximizedHeight 22
TitlePane.buttonMinimumWidth 30
TitlePane.buttonPressedBackground #999999 HSL 0 0 60 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonPressedForeground #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]
TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI]
TitlePane.buttonSymbolHeight 10
TitlePane.buttonsFillVertically true
TitlePane.buttonsGap 0
TitlePane.buttonsMargins 0,0,0,0 javax.swing.plaf.InsetsUIResource [UI]
TitlePane.centerTitle false
TitlePane.centerTitleIfMenuBarEmbedded true
TitlePane.closeHoverBackground #c42b1c HSL 5 75 44 javax.swing.plaf.ColorUIResource [UI]
TitlePane.closeHoverForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
TitlePane.closeBackground #ff0000 HSL 0 100 50 javax.swing.plaf.ColorUIResource [UI]
TitlePane.closeForeground #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI]
TitlePane.closeHoverBackground #bb0000 HSL 0 100 37 javax.swing.plaf.ColorUIResource [UI]
TitlePane.closeHoverForeground #ff00ff HSL 300 100 50 javax.swing.plaf.ColorUIResource [UI]
TitlePane.closeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI]
TitlePane.closePressedBackground #c42b1ce6 90% HSLA 5 75 44 90 javax.swing.plaf.ColorUIResource [UI]
TitlePane.closePressedForeground #ffffff HSL 0 0 100 javax.swing.plaf.ColorUIResource [UI]
TitlePane.closeInactiveBackground #dd0000 HSL 0 100 43 javax.swing.plaf.ColorUIResource [UI]
TitlePane.closeInactiveForeground #00ffff HSL 180 100 50 javax.swing.plaf.ColorUIResource [UI]
TitlePane.closePressedBackground #990000 HSL 0 100 30 javax.swing.plaf.ColorUIResource [UI]
TitlePane.closePressedForeground #00ff00 HSL 120 100 50 javax.swing.plaf.ColorUIResource [UI]
TitlePane.font [active] $defaultFont [UI]
TitlePane.foreground #0000ff HSL 240 100 50 javax.swing.plaf.ColorUIResource [UI]
TitlePane.icon [lazy] 16,16 sun.swing.ImageIconUIResource [UI] (sun.awt.image.ToolkitImage)