summaryrefslogtreecommitdiff
path: root/vcl/win/gdi
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-01-31 10:49:51 +0000
committerCaolán McNamara <caolanm@redhat.com>2023-01-31 16:49:11 +0000
commit4332c58eca7df7a30e8f11b9193d7d0727c2a36c (patch)
tree3bb28adcdfa7cc1ce1bd5b4bec9e78b348cfe081 /vcl/win/gdi
parent9c53b55a8fed37bb6ce27d49146f015dde881fdc (diff)
tdf#153273 bodge dark scrollbar into drop downs
Change-Id: I9c53b931feb7f720f86edfbb6ae88ff5ee436cef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146386 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/win/gdi')
-rw-r--r--vcl/win/gdi/salnativewidgets-luna.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx
index 8631cdc950fe..1cd6245658d6 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -1172,7 +1172,20 @@ bool WinSalGraphics::drawNativeControl( ControlType nType,
hTheme = getThemeHandle(mhWnd, L"Button", mWinSalGraphicsImplBase);
break;
case ControlType::Scrollbar:
- hTheme = getThemeHandle(mhWnd, L"Scrollbar", mWinSalGraphicsImplBase);
+ if (bUseDarkMode)
+ {
+ // tdf#153273 undo the earlier SetWindowTheme, and use an explicit Explorer::Scrollbar
+ // a) with "Scrollbar" and SetWindowTheme(... "Explorer" ...) then scrollbars in dialog
+ // and main windows are dark, but dropdowns are light
+ // b) with "Explorer::Scrollbar" and SetWindowTheme(... "Explorer" ...) then scrollbars
+ // in dropdowns are dark, but scrollbars in dialogs and main windows are sort of "extra
+ // dark"
+ // c) with "Explorer::Scrollbar" and no SetWindowTheme both cases are dark
+ SetWindowTheme(mhWnd, nullptr, nullptr);
+ hTheme = getThemeHandle(mhWnd, L"Explorer::Scrollbar", mWinSalGraphicsImplBase);
+ }
+ else
+ hTheme = getThemeHandle(mhWnd, L"Scrollbar", mWinSalGraphicsImplBase);
break;
case ControlType::Combobox:
if( nPart == ControlPart::Entire )