vcl/unx/gtk3/custom-theme.cxx | 14 +++++++------- vcl/unx/gtk3/salnativewidgets-gtk.cxx | 7 +++++++ 2 files changed, 14 insertions(+), 7 deletions(-)
New commits: commit 9051ec05066c113bde29d5c7b0a393ad923c1d99 Author: Sahil Gautam <sahil.gautam.ext...@allotropia.de> AuthorDate: Thu Dec 26 00:12:54 2024 +0530 Commit: Sahil Gautam <sahil.gautam.ext...@allotropia.de> CommitDate: Fri Jan 10 08:37:16 2025 +0100 Use disable color for disabled controls in GTK Change-Id: I65bb0e6353cfc8a2240c7219a66fa4a82f4707a9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179410 Tested-by: Jenkins Reviewed-by: Sahil Gautam <sahil.gautam.ext...@allotropia.de> diff --git a/vcl/unx/gtk3/custom-theme.cxx b/vcl/unx/gtk3/custom-theme.cxx index f7892bd68568..54aa4a808325 100644 --- a/vcl/unx/gtk3/custom-theme.cxx +++ b/vcl/unx/gtk3/custom-theme.cxx @@ -195,7 +195,7 @@ OString CreateStyleString() "}" "treeview.view.expander:disabled {" - " color: #" + aThemeColors.GetInactiveColor().AsRGBHexString() + ";" + " color: #" + aThemeColors.GetDisabledColor().AsRGBHexString() + ";" "}" // this part is still left @@ -209,7 +209,7 @@ OString CreateStyleString() "treeview.view header button," "treeview.view header button:disabled {" - " background-color: #" + aThemeColors.GetInactiveColor().AsRGBHexString() + ";" + " background-color: #" + aThemeColors.GetDisabledColor().AsRGBHexString() + ";" "}" "treeview.view header button:last-child {" @@ -342,7 +342,7 @@ OString CreateStyleString() "}" "scrollbar slider:disabled {" - " background-color: #" + aThemeColors.GetInactiveColor().AsRGBHexString() + ";" + " background-color: #" + aThemeColors.GetDisabledColor().AsRGBHexString() + ";" "}" "scrollbar.overlay-indicator:not(.dragging):not(.hovering) {" @@ -355,7 +355,7 @@ OString CreateStyleString() "check:disabled," "radio:disabled {" - " background-color: #" + aThemeColors.GetInactiveColor().AsRGBHexString() + ";" + " background-color: #" + aThemeColors.GetDisabledColor().AsRGBHexString() + ";" "}" "check:checked," @@ -387,7 +387,7 @@ OString CreateStyleString() "radio:checked:disabled," "radio:indeterminate:disabled {" " color: rgba(17, 17, 27, 0.38);" - " background-color: #" + aThemeColors.GetInactiveColor().AsRGBHexString() + ";" + " background-color: #" + aThemeColors.GetDisabledColor().AsRGBHexString() + ";" "}" /*************** @@ -453,7 +453,7 @@ OString CreateStyleString() "}" "button:disabled {" - " background-color: #" + aThemeColors.GetInactiveColor().AsRGBHexString() + ";" + " background-color: #" + aThemeColors.GetDisabledColor().AsRGBHexString() + ";" " color: #" + aThemeColors.GetInactiveTextColor().AsRGBHexString() + ";" " border: 1px solid #" + aThemeColors.GetInactiveBorderColor().AsRGBHexString() + ";" "}" @@ -516,7 +516,7 @@ OString CreateStyleString() "button.combo:only-child:disabled {" " box-shadow: 0 0 0 2px transparent;" - " background-color: #" + aThemeColors.GetInactiveColor().AsRGBHexString() + ";" + " background-color: #" + aThemeColors.GetDisabledColor().AsRGBHexString() + ";" " color: #" + aThemeColors.GetInactiveTextColor().AsRGBHexString() + ";" "}" commit d2bf91d9594e38552e030b66dfb71084d0fb2664 Author: Sahil Gautam <sahil.gautam.ext...@allotropia.de> AuthorDate: Thu Dec 26 00:03:59 2024 +0530 Commit: Sahil Gautam <sahil.gautam.ext...@allotropia.de> CommitDate: Fri Jan 10 08:37:02 2025 +0100 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.ext...@allotropia.de> Tested-by: Jenkins 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 );