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>
This commit is contained in:
parent
1a1957eab9
commit
c43c4a0008
1 changed files with 12 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Reference in a new issue