vcl/win/window/salframe.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 70c46e0e03a758fda4e94b561fdcae722414719f
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sat Oct 7 19:34:46 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Oct 8 14:54:54 2023 +0200

    tdf#156040 pick a better "LightColor" for windows dark theme
    
    in the absence of a better idea, do like StyleSettings::Set3DColors does
    
    Change-Id: I9868d4eb94fb221fcbf5e3a4e4761fb2bd8888fc
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157681
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 7ebe68077ec2..7c26ea1e903f 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -2706,6 +2706,13 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings 
)
         GetThemeColor(hTheme, 0, 0, TMT_FILLCOLOR, &color);
         aStyleSettings.SetFaceColor( ImplWinColorToSal( color ) );
         aStyleSettings.SetWindowColor( ImplWinColorToSal( color ) );
+
+        // tdf#156040 in the absence of a better idea, do like
+        // StyleSettings::Set3DColors does
+        Color aLightColor(ImplWinColorToSal(color));
+        aLightColor.DecreaseLuminance(64);
+        aStyleSettings.SetLightColor(aLightColor);
+
         GetThemeColor(hTheme, 0, 0, TMT_TEXTCOLOR, &color);
         aStyleSettings.SetWindowTextColor( ImplWinColorToSal( color ) );
         aStyleSettings.SetToolTextColor( ImplWinColorToSal( color ) );
@@ -2757,6 +2764,7 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
         aStyleSettings.SetWindowColor( ImplWinColorToSal( GetSysColor( 
COLOR_WINDOW ) ) );
         aStyleSettings.SetWindowTextColor( ImplWinColorToSal( GetSysColor( 
COLOR_WINDOWTEXT ) ) );
         aStyleSettings.SetToolTextColor( ImplWinColorToSal( GetSysColor( 
COLOR_WINDOWTEXT ) ) );
+        aStyleSettings.SetLightColor( ImplWinColorToSal( GetSysColor( 
COLOR_3DHILIGHT ) ) );
         aStyleSettings.SetShadowColor( ImplWinColorToSal( GetSysColor( 
COLOR_3DSHADOW ) ) );
         aStyleSettings.SetDarkShadowColor( ImplWinColorToSal( GetSysColor( 
COLOR_3DDKSHADOW ) ) );
         aControlTextColor = ImplWinColorToSal(GetSysColor(COLOR_BTNTEXT));
@@ -2781,7 +2789,6 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
     aStyleSettings.SetMenuBarTextColor( aMenuBarTextColor );
     aStyleSettings.SetMenuBarRolloverTextColor( aMenuBarRolloverTextColor );
 
-    aStyleSettings.SetLightColor( ImplWinColorToSal( GetSysColor( 
COLOR_3DHILIGHT ) ) );
     aStyleSettings.SetLightBorderColor( ImplWinColorToSal( GetSysColor( 
COLOR_3DLIGHT ) ) );
     aStyleSettings.SetHelpColor( ImplWinColorToSal( GetSysColor( COLOR_INFOBK 
) ) );
     aStyleSettings.SetHelpTextColor( ImplWinColorToSal( GetSysColor( 
COLOR_INFOTEXT ) ) );

Reply via email to