diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-03-18 21:09:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-03-19 11:40:26 +0100 |
commit | c43c4a00089b1965c7ef69ef40c9e645dffc2e43 (patch) | |
tree | 66afd4c7d212eaa9eb7bb7f950cd09eadb47c65b /vcl/win | |
parent | 1a1957eab90a11b5481faa1ef6d877eed1ce564a (diff) |
Related: tdf#118320 darkmode DrawThemeBackground doesn't work for tab bodies
so just draw it as solid window color
Change-Id: I4e452a7d6a21be91da8e23901746064fd33ee386
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131842
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/gdi/salnativewidgets-luna.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index c4113b877f1f..805db681a211 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -756,6 +756,17 @@ static bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, if( nType == ControlType::TabBody ) { + // tabbody in main window gets drawn in white in "darkmode", so bodge this here + if (UseDarkMode()) + { + Color aColor(Application::GetSettings().GetStyleSettings().GetWindowColor()); + ScopedHBRUSH hbrush(CreateSolidBrush(RGB(aColor.GetRed(), + aColor.GetGreen(), + aColor.GetBlue()))); + FillRect(hDC, &rc, hbrush.get()); + return true; + } + iPart = TABP_BODY; return ImplDrawTheme( hTheme, hDC, iPart, iState, rc, aCaption); } @@ -840,7 +851,7 @@ static bool ImplDrawNativeControl( HDC hDC, HTHEME hTheme, RECT rc, rc.top = 0; // extend potential gradient to cover menu bar as well } - // menubar in main window gets drawn in white in "darkmode", so bodge this here + // toolbar in main window gets drawn in white in "darkmode", so bodge this here if (UseDarkMode()) { Color aColor(Application::GetSettings().GetStyleSettings().GetWindowColor()); |