summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2022-07-01 10:45:13 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2022-07-02 06:55:15 +0200
commit169ff786a6694ab412d53c911550db101fb50876 (patch)
tree03b60d65df95b4ade8b26ac7dac1824b0c02e945 /vcl
parente01fc6d7c1353ed2df4d8fcc06bd3b335e89fa04 (diff)
tdf#149804 Set newly introduced list box colors from system colors
commit 3c6a53b9ce64180b2a03e097c1844f7496f26815 Date: Sat Apr 17 14:49:43 2021 +0200 improve the look of the macOS combobox had introduced separate style colors to be used for list/combo boxes, but since those new colors were not set explicitly for gtk3, qt5/qt6 and Windows, this resulted in style/theme/system colors no longer being used, but only the default colors introduced in above commit. This sets the style/theme/system colors for qt5/qt6, gtk3 and Windows as well, using the same values that were used previously. Change-Id: I31401af38b991e7e0cdc436b894ee0f491a22752 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136735 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qt5/QtFrame.cxx4
-rw-r--r--vcl/unx/gtk3/salnativewidgets-gtk.cxx5
-rw-r--r--vcl/win/window/salframe.cxx4
3 files changed, 13 insertions, 0 deletions
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 3a240b2808ca..1b9f8ae88175 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -1085,6 +1085,7 @@ void QtFrame::UpdateSettings(AllSettings& rSettings)
// Text
style.SetFieldTextColor(aText);
style.SetFieldRolloverTextColor(aText);
+ style.SetListBoxWindowTextColor(aText);
style.SetWindowTextColor(aText);
style.SetToolTextColor(aText);
@@ -1092,6 +1093,7 @@ void QtFrame::UpdateSettings(AllSettings& rSettings)
style.SetFieldColor(aBase);
style.SetWindowColor(aBase);
style.SetActiveTabColor(aBase);
+ style.SetListBoxWindowBackgroundColor(aBase);
style.SetAlternatingRowColor(toColor(pal.color(QPalette::Active, QPalette::AlternateBase)));
// Buttons
@@ -1129,6 +1131,8 @@ void QtFrame::UpdateSettings(AllSettings& rSettings)
// Selection
style.SetHighlightColor(aHigh);
style.SetHighlightTextColor(aHighText);
+ style.SetListBoxWindowHighlightColor(aHigh);
+ style.SetListBoxWindowHighlightTextColor(aHighText);
style.SetActiveColor(aHigh);
style.SetActiveTextColor(aHighText);
diff --git a/vcl/unx/gtk3/salnativewidgets-gtk.cxx b/vcl/unx/gtk3/salnativewidgets-gtk.cxx
index 3eaffc903e16..3074dd0fbad7 100644
--- a/vcl/unx/gtk3/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/salnativewidgets-gtk.cxx
@@ -2306,6 +2306,7 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
aStyleSet.SetButtonTextColor( aTextColor );
aStyleSet.SetDefaultActionButtonTextColor(aTextColor);
aStyleSet.SetActionButtonTextColor(aTextColor);
+ aStyleSet.SetListBoxWindowTextColor( aTextColor );
aStyleSet.SetRadioCheckTextColor( aTextColor );
aStyleSet.SetGroupTextColor( aTextColor );
aStyleSet.SetLabelTextColor( aTextColor );
@@ -2406,6 +2407,8 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
::Color aHighlightTextColor = getColor( text_color );
aStyleSet.SetHighlightColor( aHighlightColor );
aStyleSet.SetHighlightTextColor( aHighlightTextColor );
+ aStyleSet.SetListBoxWindowHighlightColor( aHighlightColor );
+ aStyleSet.SetListBoxWindowHighlightTextColor( aHighlightTextColor );
// make active like highlight, except with a small contrast. Note, see
// a GtkListBoxRow in a GtkStackSidebar for a gtk widget with a
// difference between highlighted and highlighted with focus.
@@ -2424,6 +2427,8 @@ bool GtkSalGraphics::updateSettings(AllSettings& rSettings)
aStyleSet.SetFieldColor( aBackFieldColor );
// This baby is the default page/paper color
aStyleSet.SetWindowColor( aBackFieldColor );
+ // listbox background color
+ aStyleSet.SetListBoxWindowBackgroundColor( aBackFieldColor );
#if GTK_CHECK_VERSION(4, 0, 0)
double caretAspectRatio = 0.04f;
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index b419a259c450..598b5ea70fa8 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -2714,10 +2714,14 @@ void WinSalFrame::UpdateSettings( AllSettings& rSettings )
aStyleSettings.SetActiveTabColor( aStyleSettings.GetWindowColor() );
aStyleSettings.SetToolTextColor( ImplWinColorToSal( GetSysColor( COLOR_WINDOWTEXT ) ) );
aStyleSettings.SetFieldColor( aStyleSettings.GetWindowColor() );
+ aStyleSettings.SetListBoxWindowBackgroundColor( aStyleSettings.GetWindowColor() );
aStyleSettings.SetFieldTextColor( aStyleSettings.GetWindowTextColor() );
aStyleSettings.SetFieldRolloverTextColor( aStyleSettings.GetFieldTextColor() );
+ aStyleSettings.SetListBoxWindowTextColor( aStyleSettings.GetFieldTextColor() );
aStyleSettings.SetHighlightColor( ImplWinColorToSal( GetSysColor( COLOR_HIGHLIGHT ) ) );
aStyleSettings.SetHighlightTextColor( ImplWinColorToSal( GetSysColor( COLOR_HIGHLIGHTTEXT ) ) );
+ aStyleSettings.SetListBoxWindowHighlightColor( aStyleSettings.GetHighlightColor() );
+ aStyleSettings.SetListBoxWindowHighlightTextColor( aStyleSettings.GetHighlightTextColor() );
aStyleSettings.SetMenuHighlightColor( aStyleSettings.GetHighlightColor() );
aStyleSettings.SetMenuHighlightTextColor( aStyleSettings.GetHighlightTextColor() );