summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-01-31 10:22:35 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2023-02-01 01:58:06 +0000
commitc85107bc4ab93e2cdc9db1700577ec3f462d9fe9 (patch)
tree12113a9d8e8eab44f6b71b0694556a1a933993dd /vcl
parent5b64ac83cdbab98052c478d5bb6954b324a36171 (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/+/146395 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/win/gdi/salnativewidgets-luna.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx b/vcl/win/gdi/salnativewidgets-luna.cxx
index 5ab4c6cb4dd6..1cd6245658d6 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -1189,7 +1189,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)
@@ -1199,7 +1203,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;
@@ -1207,6 +1215,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;