diff options
author | Sahil Gautam <sahil.gautam.extern@allotropia.de> | 2024-12-26 00:03:59 +0530 |
---|---|---|
committer | Sahil Gautam <sahil.gautam.extern@allotropia.de> | 2025-01-10 08:37:02 +0100 |
commit | d2bf91d9594e38552e030b66dfb71084d0fb2664 (patch) | |
tree | f264c8641d97bdd641c546fd328e25e0df56d607 | |
parent | 88975a654ca8c69d5ee1fd5146435ec08ea1a30e (diff) |
Set StyleSettings::DisableColor value in GTK
Themes uses StyleSettings::DisableColor value as the default color value
for disabled UI elements. Set it in the UpdateSettings function for GTK.
Change-Id: Ida71a0aaff2e05309d9b8c03d15b3db8ed5a7aab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179409
Reviewed-by: Sahil Gautam <sahil.gautam.extern@allotropia.de>
Tested-by: Jenkins
-rw-r--r-- | vcl/unx/gtk3/salnativewidgets-gtk.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx index 175a4aa42faa..c3bbda65728f 100644 --- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx @@ -2479,6 +2479,13 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings) aShadowColor.DecreaseLuminance(64); aStyleSet.SetShadowColor(aShadowColor); + ::Color aDisabledColor(aBackFieldColor); + if (aBackFieldColor.GetLuminance() > aBackColor.GetLuminance()) + aDisabledColor.IncreaseLuminance(8); + else + aDisabledColor.DecreaseLuminance(8); + aStyleSet.SetDisableColor(aDisabledColor); + aContextState.restore(); #if !GTK_CHECK_VERSION(4, 0, 0) g_object_unref( pCStyle ); |