From 4db39828eff2dff8e11ef0fa2179a9c887a73244 Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 2 Oct 2021 00:53:54 +0200 Subject: [PATCH] Theming improvements: reordered variables and added comments --- .../com/formdev/flatlaf/FlatDarkLaf.properties | 17 +++++++++++++---- .../com/formdev/flatlaf/FlatLightLaf.properties | 17 +++++++++++++---- 2 files changed, 26 insertions(+), 8 deletions(-) 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 4d57725e..22e89689 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatDarkLaf.properties @@ -32,20 +32,29 @@ #---- variables ---- +# general background and foreground (text color) @background = #3c3f41 @foreground = #bbb +@disabledText = shade(@foreground,25%) + +# component background +@buttonBackground = tint(@background,9%) +@textComponentBackground = tint(@background,5%) +@menuBackground = darken(@background,5%) + +# selection @selectionBackground = @accentSelectionBackground @selectionForeground = contrast(@selectionBackground, @background, @foreground, 25%) @selectionInactiveBackground = spin(saturate(shade(@selectionBackground,70%),20%),-15) @selectionInactiveForeground = @foreground -@disabledText = shade(@foreground,25%) -@buttonBackground = tint(@background,9%) -@textComponentBackground = tint(@background,5%) -@menuBackground = darken(@background,5%) + +# menu @menuHoverBackground = lighten(@menuBackground,10%,derived) @menuCheckBackground = darken(@selectionBackground,10%,derived noAutoInverse) @menuAcceleratorForeground = darken(@foreground,15%) @menuAcceleratorSelectionForeground = @selectionForeground + +# misc @cellFocusColor = #000 @icon = shade(@foreground,7%) 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 e2a2529e..3f95a7f9 100644 --- a/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties +++ b/flatlaf-core/src/main/resources/com/formdev/flatlaf/FlatLightLaf.properties @@ -32,20 +32,29 @@ #---- variables ---- +# general background and foreground (text color) @background = #f2f2f2 @foreground = #000 +@disabledText = tint(@foreground,55%) + +# component background +@buttonBackground = lighten(@background,5%) +@textComponentBackground = lighten(@background,5%) +@menuBackground = lighten(@background,5%) + +# selection @selectionBackground = @accentSelectionBackground @selectionForeground = contrast(@selectionBackground, @foreground, #fff) @selectionInactiveBackground = shade(@background,13%) @selectionInactiveForeground = @foreground -@disabledText = tint(@foreground,55%) -@buttonBackground = lighten(@background,5%) -@textComponentBackground = lighten(@background,5%) -@menuBackground = lighten(@background,5%) + +# menu @menuHoverBackground = darken(@menuBackground,10%,derived) @menuCheckBackground = lighten(@selectionBackground,40%,derived noAutoInverse) @menuAcceleratorForeground = lighten(@foreground,30%) @menuAcceleratorSelectionForeground = @selectionForeground + +# misc @cellFocusColor = #000 @icon = shade(@background,27%)