vcl/win/gdi/salnativewidgets-luna.cxx | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-)
New commits: commit 4f6a0acad0a05dd33d9ddb2df1d6c6605b52afed Author: Heiko Tietze <tietze.he...@gmail.com> AuthorDate: Mon Oct 6 14:26:41 2025 +0200 Commit: Heiko Tietze <heiko.tie...@documentfoundation.org> CommitDate: Tue Oct 7 07:47:30 2025 +0200 Resolves tdf#168714 - Lack of contrast on vertical tabs VTs are drawn now like in the past with the accent color while HTs merge better with the tab content when drawn in activetabcolor (and some lighten/darken when not selected) Change-Id: I3e0f8d0b0320de3d65d81c90d5e218dfe44c2956 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191962 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index 97110f67c600..0aca470e6f76 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -1098,20 +1098,29 @@ static bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, if (bCanUseThemeColors || bUseDarkMode) { Color aColor; + const bool bVertical = (rValue.meTabBarPosition == TabBarPosition::Left) + | (rValue.meTabBarPosition == TabBarPosition::Right); switch (iState) { case TILES_NORMAL: aColor = Application::GetSettings().GetStyleSettings().GetActiveTabColor(); - if (aColor.IsDark()) - aColor.IncreaseLuminance(30); - else - aColor.DecreaseLuminance(30); + if (!bVertical) + { + if (aColor.IsDark()) + aColor.IncreaseLuminance(30); + else + aColor.DecreaseLuminance(30); + } break; case TILES_DISABLED: aColor = Application::GetSettings().GetStyleSettings().GetInactiveTabColor(); break; case TILES_SELECTED: - aColor = Application::GetSettings().GetStyleSettings().GetActiveTabColor(); + // Vertical tabs do not merge nicely with the content and are drawn with accent color therefore + aColor + = bVertical + ? Application::GetSettings().GetStyleSettings().GetAccentColor() + : Application::GetSettings().GetStyleSettings().GetActiveTabColor(); break; case TILES_HOT: aColor = Application::GetSettings().GetStyleSettings().GetMenuBarRolloverColor();