From e768791eba0501f6c60e35ded58c2c4e3d1596a0 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sun, 9 Jan 2022 12:59:08 +0100 Subject: [PATCH] Native window decorations: updated hover and pressed colors of iconify/maximize/close buttons for Windows 11 style --- CHANGELOG.md | 8 ++++++-- .../resources/com/formdev/flatlaf/FlatDarkLaf.properties | 4 ++-- .../main/resources/com/formdev/flatlaf/FlatLaf.properties | 4 ++-- .../resources/com/formdev/flatlaf/FlatLightLaf.properties | 2 +- flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt | 8 ++++---- flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt | 6 +++--- flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt | 4 ++-- 7 files changed, 20 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f61fd80..772725b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,8 +28,12 @@ FlatLaf Change Log in FlatLaf 1.x). (issue #454) - Native window decorations: Fixed blurry iconify/maximize/close button hover rectangles at 125%, 150% or 175% scaling. (issue #431) -- Native window decorations: Updated maximize and restore icons for Windows 11 - style. (requires Java 8u321, 11.0.14, 17.0.2 or 18+) +- Native window decorations: + - Updated maximize and restore icons for Windows 11 style. (requires Java + 8u321, 11.0.14, 17.0.2 or 18+) + - Updated hover and pressed colors of iconify/maximize/close buttons for + Windows 11 style. + ## 2.0-rc1 diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties index 28e159a6..f32253ea 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -334,8 +334,8 @@ TableHeader.bottomSeparatorColor = $TableHeader.separatorColor #---- TitlePane ---- TitlePane.embeddedForeground = darken($TitlePane.foreground,15%) -TitlePane.buttonHoverBackground = lighten($TitlePane.background,10%,derived) -TitlePane.buttonPressedBackground = lighten($TitlePane.background,20%,derived) +TitlePane.buttonHoverBackground = lighten($TitlePane.background,15%,derived) +TitlePane.buttonPressedBackground = lighten($TitlePane.background,10%,derived) #---- ToggleButton ---- diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties index 8397b161..94a29263 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLaf.properties @@ -802,8 +802,8 @@ TitlePane.inactiveBackground = $TitlePane.background TitlePane.foreground = @foreground TitlePane.inactiveForeground = @disabledForeground -TitlePane.closeHoverBackground = #e81123 -TitlePane.closePressedBackground = fade($TitlePane.closeHoverBackground,60%) +TitlePane.closeHoverBackground = #c42b1c +TitlePane.closePressedBackground = fade($TitlePane.closeHoverBackground,90%) TitlePane.closeHoverForeground = #fff TitlePane.closePressedForeground = #fff diff --git a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties index 1c67c8ed..e15b6fae 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -342,7 +342,7 @@ TableHeader.bottomSeparatorColor = $TableHeader.separatorColor TitlePane.embeddedForeground = lighten($TitlePane.foreground,35%) TitlePane.buttonHoverBackground = darken($TitlePane.background,10%,derived) -TitlePane.buttonPressedBackground = darken($TitlePane.background,20%,derived) +TitlePane.buttonPressedBackground = darken($TitlePane.background,8%,derived) #---- ToggleButton ---- diff --git a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt index 63e39f3e..d0429198 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatDarkLaf_1.8.0.txt @@ -1207,16 +1207,16 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI #---- TitlePane ---- TitlePane.background #303234 HSL 210 4 20 javax.swing.plaf.ColorUIResource [UI] -TitlePane.buttonHoverBackground #484c4f HSL 206 5 30 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse) +TitlePane.buttonHoverBackground #55585c HSL 214 4 35 com.formdev.flatlaf.util.DerivedColor [UI] lighten(15% autoInverse) TitlePane.buttonMaximizedHeight 22 -TitlePane.buttonPressedBackground #616569 HSL 210 4 40 com.formdev.flatlaf.util.DerivedColor [UI] lighten(20% autoInverse) +TitlePane.buttonPressedBackground #484c4f HSL 206 5 30 com.formdev.flatlaf.util.DerivedColor [UI] lighten(10% autoInverse) TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI] TitlePane.centerTitle false TitlePane.centerTitleIfMenuBarEmbedded true -TitlePane.closeHoverBackground #e81123 HSL 355 86 49 javax.swing.plaf.ColorUIResource [UI] +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.closeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI] -TitlePane.closePressedBackground #e8112399 60% HSLA 355 86 49 60 javax.swing.plaf.ColorUIResource [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.embeddedForeground #959595 HSL 0 0 58 javax.swing.plaf.ColorUIResource [UI] TitlePane.foreground #bbbbbb HSL 0 0 73 javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt index 09cdb33c..8cf90058 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatLightLaf_1.8.0.txt @@ -1214,14 +1214,14 @@ TextPaneUI com.formdev.flatlaf.ui.FlatTextPaneUI 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.buttonMaximizedHeight 22 -TitlePane.buttonPressedBackground #cccccc HSL 0 0 80 com.formdev.flatlaf.util.DerivedColor [UI] darken(20% autoInverse) +TitlePane.buttonPressedBackground #ebebeb HSL 0 0 92 com.formdev.flatlaf.util.DerivedColor [UI] darken(8% autoInverse) TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI] TitlePane.centerTitle false TitlePane.centerTitleIfMenuBarEmbedded true -TitlePane.closeHoverBackground #e81123 HSL 355 86 49 javax.swing.plaf.ColorUIResource [UI] +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.closeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI] -TitlePane.closePressedBackground #e8112399 60% HSLA 355 86 49 60 javax.swing.plaf.ColorUIResource [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.embeddedForeground #595959 HSL 0 0 35 javax.swing.plaf.ColorUIResource [UI] TitlePane.foreground #000000 HSL 0 0 0 javax.swing.plaf.ColorUIResource [UI] diff --git a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt index c1cd5772..d81a5749 100644 --- a/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt +++ b/flatlaf-testing/dumps/uidefaults/FlatTestLaf_1.8.0.txt @@ -1233,10 +1233,10 @@ TitlePane.buttonMaximizedHeight 22 TitlePane.buttonSize 44,30 javax.swing.plaf.DimensionUIResource [UI] TitlePane.centerTitle false TitlePane.centerTitleIfMenuBarEmbedded true -TitlePane.closeHoverBackground #e81123 HSL 355 86 49 javax.swing.plaf.ColorUIResource [UI] +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.closeIcon [lazy] 44,30 com.formdev.flatlaf.icons.FlatWindowCloseIcon [UI] -TitlePane.closePressedBackground #e8112399 60% HSLA 355 86 49 60 javax.swing.plaf.ColorUIResource [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.foreground #0000ff HSL 240 100 50 javax.swing.plaf.ColorUIResource [UI] TitlePane.icon [lazy] 16,16 sun.swing.ImageIconUIResource [UI] (sun.awt.image.ToolkitImage)