diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-01-31 10:22:35 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-01-31 15:06:37 +0000 |
commit | 64b8057a6cd2fbaed6167e2be912914e9569796c (patch) | |
tree | bd6a0c8cb00f0bbfa86da66c4c5e9eb0e41abdc7 | |
parent | 4f841e9a28a6f5d7ae9d5226cbc98db3cb992eb1 (diff) |
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/+/146384
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/win/gdi/salnativewidgets-luna.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx index 1c177a1b2a97..8631cdc950fe 100644 --- a/vcl/win/gdi/salnativewidgets-luna.cxx +++ b/vcl/win/gdi/salnativewidgets-luna.cxx @@ -1176,7 +1176,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", mWinSalGraphicsImplBase); + } else if( nPart == ControlPart::ButtonDown ) { if (bUseDarkMode) @@ -1186,7 +1190,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", mWinSalGraphicsImplBase); + } else hTheme = getThemeHandle(mhWnd, L"Spin", mWinSalGraphicsImplBase); break; @@ -1194,6 +1202,10 @@ bool WinSalGraphics::drawNativeControl( ControlType nType, hTheme = getThemeHandle(mhWnd, L"Spin", mWinSalGraphicsImplBase); break; case ControlType::Editbox: + if (bUseDarkMode && !(nState & ControlState::FOCUSED)) + SetWindowTheme(mhWnd, L"CFD", nullptr); + hTheme = getThemeHandle(mhWnd, L"Edit", mWinSalGraphicsImplBase); + break; case ControlType::MultilineEditbox: hTheme = getThemeHandle(mhWnd, L"Edit", mWinSalGraphicsImplBase); break; |