vcl/win/gdi/salnativewidgets-luna.cxx | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-)
New commits: commit 64c400a67db8441fdc5597782c5270cd5028e0fd Author: Caolán McNamara <[email protected]> AuthorDate: Tue Jan 31 10:22:35 2023 +0000 Commit: Christian Lohmaier <[email protected]> CommitDate: Wed Feb 15 16:05:15 2023 +0000 tdf#153287 rollover in dark mode with "Explorer" is incongruous Using "CFD" gives a brighter border with rollover, but no notable focus state when focused. Try a combination here to get something decent. Change-Id: If7844cb0f1e88410959aa622b0271c3f3954230e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146388 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index 8156da8b9eba..fffcb2f1dc59 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -1163,7 +1163,11 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, break; case ControlType::Combobox: if( nPart == ControlPart::Entire ) + { + if (bUseDarkMode && !(nState & ControlState::FOCUSED)) + SetWindowTheme(mhWnd, L"CFD", nullptr); hTheme = getThemeHandle(mhWnd, L"Edit", mpImpl.get()); + } else if( nPart == ControlPart::ButtonDown ) { if (bUseDarkMode) @@ -1173,7 +1177,11 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, break; case ControlType::Spinbox: if( nPart == ControlPart::Entire ) + { + if (bUseDarkMode && !(nState & ControlState::FOCUSED)) + SetWindowTheme(mhWnd, L"CFD", nullptr); hTheme = getThemeHandle(mhWnd, L"Edit", mpImpl.get()); + } else hTheme = getThemeHandle(mhWnd, L"Spin", mpImpl.get()); break; @@ -1181,6 +1189,10 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, hTheme = getThemeHandle(mhWnd, L"Spin", mpImpl.get()); break; case ControlType::Editbox: + if (bUseDarkMode && !(nState & ControlState::FOCUSED)) + SetWindowTheme(mhWnd, L"CFD", nullptr); + hTheme = getThemeHandle(mhWnd, L"Edit", mpImpl.get()); + break; case ControlType::MultilineEditbox: hTheme = getThemeHandle(mhWnd, L"Edit", mpImpl.get()); break; commit 165dce050b41c1268a56905986f97263717f1184 Author: Caolán McNamara <[email protected]> AuthorDate: Tue Jan 31 10:49:51 2023 +0000 Commit: Christian Lohmaier <[email protected]> CommitDate: Wed Feb 15 16:05:05 2023 +0000 tdf#153273 bodge dark scrollbar into drop downs Change-Id: I9c53b931feb7f720f86edfbb6ae88ff5ee436cef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146387 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index 165592e7f6c1..8156da8b9eba 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -1146,7 +1146,20 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, hTheme = getThemeHandle(mhWnd, L"Button", mpImpl.get()); break; case ControlType::Scrollbar: - hTheme = getThemeHandle(mhWnd, L"Scrollbar", mpImpl.get()); + 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", mpImpl.get()); + } + else + hTheme = getThemeHandle(mhWnd, L"Scrollbar", mpImpl.get()); break; case ControlType::Combobox: if( nPart == ControlPart::Entire )
