vcl/win/gdi/salnativewidgets-luna.cxx |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit c85107bc4ab93e2cdc9db1700577ec3f462d9fe9
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Jan 31 10:22:35 2023 +0000
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Wed Feb 1 01:58:06 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/+/146395
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

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;

Reply via email to