vcl/win/window/salframe.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 39f589a11768124a5b415c94cccb0141a798405d Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Dec 13 12:21:49 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Dec 13 14:40:03 2022 +0000 Related: tdf#152454 pick something suitable for dark mode Inactive tab color on Windows Change-Id: I400ca7d8c0c541977b574ae08f08aa5f28a2e3d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144054 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx index 60df85ba814e..7158ca3e1fc1 100644 --- a/vcl/win/window/salframe.cxx +++ b/vcl/win/window/salframe.cxx @@ -2677,6 +2677,12 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aMenuBarRolloverTextColor = ImplWinColorToSal( color ); CloseThemeData(hTheme); + aStyleSettings.SetActiveTabColor( aStyleSettings.GetWindowColor() ); + hTheme = OpenThemeData(mhWnd, L"Toolbar"); + GetThemeColor(hTheme, 0, 0, TMT_FILLCOLOR, &color); + aStyleSettings.SetInactiveTabColor( ImplWinColorToSal( color ) ); + CloseThemeData(hTheme); + // tdf#148448 pick a warning color more likely to be readable as a // background in a dark theme aStyleSettings.SetWarningColor(Color(0xf5, 0x79, 0x00)); @@ -2694,6 +2700,8 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetMenuTextColor( ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ) ); aMenuBarTextColor = ImplWinColorToSal( GetSysColor( COLOR_MENUTEXT ) ); aMenuBarRolloverTextColor = aHighlightTextColor; + aStyleSettings.SetActiveTabColor( aStyleSettings.GetWindowColor() ); + aStyleSettings.SetInactiveTabColor( aStyleSettings.GetFaceColor() ); } if ( std::optional<Color> aColor = aStyleSettings.GetPersonaMenuBarTextColor() ) @@ -2705,7 +2713,6 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetMenuBarTextColor( aMenuBarTextColor ); aStyleSettings.SetMenuBarRolloverTextColor( aMenuBarRolloverTextColor ); - aStyleSettings.SetInactiveTabColor( aStyleSettings.GetFaceColor() ); aStyleSettings.SetLightColor( ImplWinColorToSal( GetSysColor( COLOR_3DHILIGHT ) ) ); aStyleSettings.SetLightBorderColor( ImplWinColorToSal( GetSysColor( COLOR_3DLIGHT ) ) ); aStyleSettings.SetHelpColor( ImplWinColorToSal( GetSysColor( COLOR_INFOBK ) ) ); @@ -2747,7 +2754,6 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings ) aStyleSettings.SetGroupTextColor( aStyleSettings.GetRadioCheckTextColor() ); aStyleSettings.SetLabelTextColor( aStyleSettings.GetRadioCheckTextColor() ); - aStyleSettings.SetActiveTabColor( aStyleSettings.GetWindowColor() ); aStyleSettings.SetFieldColor( aStyleSettings.GetWindowColor() ); aStyleSettings.SetListBoxWindowBackgroundColor( aStyleSettings.GetWindowColor() ); aStyleSettings.SetFieldTextColor( aStyleSettings.GetWindowTextColor() );