vcl/unx/gtk3/salnativewidgets-gtk.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit d84a777e3b526a5ccc97794a144d57c93913afa3
Author:     Sahil Gautam <[email protected]>
AuthorDate: Thu Dec 26 00:03:33 2024 +0530
Commit:     Adolfo Jayme Barrientos <[email protected]>
CommitDate: Wed Mar 5 01:48:58 2025 +0100

    Use different color for the window and the field in GTK
    
    Usually fields use different colors compared to the window, usually a
    lighter shade when using dark mode, and a darker shade otherwise.
    However StyleSettings::GetWindowColor and StyleSettings::GetFieldColor
    were reporting the same colors. Fixed it.
    
    Change-Id: Iadb4f66b339e82498a5b073cc55d3dfdbb88e619
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179408
    Reviewed-by: Sahil Gautam <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit 88975a654ca8c69d5ee1fd5146435ec08ea1a30e)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182130
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>

diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx 
b/vcl/unx/gtk3/salnativewidgets-gtk.cxx
index 4562201a320c..9f5fac8a30af 100644
--- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx
@@ -2338,6 +2338,7 @@ bool GtkSalGraphics::updateSettings(AllSettings& 
rSettings)
     // background colors
     ::Color aBackColor = style_context_get_background_color(pStyle);
     aStyleSet.BatchSetBackgrounds( aBackColor );
+    aStyleSet.SetWindowColor(aBackColor);
 
     // UI font
 #if GTK_CHECK_VERSION(4, 0, 0)
@@ -2451,8 +2452,6 @@ bool GtkSalGraphics::updateSettings(AllSettings& 
rSettings)
         style_context_set_state(pCStyle, GTK_STATE_FLAG_NORMAL);
         ::Color aBackFieldColor = style_context_get_background_color(pCStyle);
         aStyleSet.SetFieldColor( aBackFieldColor );
-        // This baby is the default page/paper color
-        aStyleSet.SetWindowColor( aBackFieldColor );
         // listbox background color
         aStyleSet.SetListBoxWindowBackgroundColor( aBackFieldColor );
 

Reply via email to