summaryrefslogtreecommitdiff
path: root/vcl/qt5/Qt5Frame.cxx
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2020-10-23 18:43:25 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2020-10-27 10:50:59 +0100
commit6dfbab409032516e05a63fbc777b9147d1deb4ec (patch)
tree5e7c7440e033d8aaee118cfd9ead61387af0f864 /vcl/qt5/Qt5Frame.cxx
parentc070fac05fef41f788b53fe2c1f60519688a40b1 (diff)
tdf#136555 apply window bg color for button boxes
The default background color of the frame is APPBACKGROUND, which is matched to GetWorkspaceColor(). That color is visible in Writer as the default document workspace background. Originally I just saw the dark background of the button box in the start center, and thought the workspace color in Qt is wrong and changed it in the reverted commit, missing the change of the color around the Writer document. Now that the button boxes's background color isn't fixed via the "branding" setting, we also must react to changed style settings, so we override the DataChanged function. This also reverts commit e0c72e31c1d455c26110c35e8780d420e17cdea6. Regressed-by: a927e0964ba0442d53fffb22c577e54bcf183ed7 Change-Id: I62396355054523baef1197a8a8af61c2f0d29ef3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104740 Tested-by: Jenkins Reviewed-by: Thorsten Wagner <thorsten.wagner.4@gmail.com> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl/qt5/Qt5Frame.cxx')
-rw-r--r--vcl/qt5/Qt5Frame.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index b3ae786e97b0..21f00c62947a 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -1023,6 +1023,7 @@ void Qt5Frame::UpdateSettings(AllSettings& rSettings)
Color aText = toColor(pal.color(QPalette::Active, QPalette::Text));
Color aBase = toColor(pal.color(QPalette::Active, QPalette::Base));
Color aButn = toColor(pal.color(QPalette::Active, QPalette::ButtonText));
+ Color aMid = toColor(pal.color(QPalette::Active, QPalette::Mid));
Color aHigh = toColor(pal.color(QPalette::Active, QPalette::Highlight));
Color aHighText = toColor(pal.color(QPalette::Active, QPalette::HighlightedText));
Color aLink = toColor(pal.color(QPalette::Active, QPalette::Link));
@@ -1046,7 +1047,6 @@ void Qt5Frame::UpdateSettings(AllSettings& rSettings)
style.SetFieldColor(aBase);
style.SetWindowColor(aBase);
style.SetActiveTabColor(aBase);
- style.SetWorkspaceColor(aBase);
style.SetAlternatingRowColor(toColor(pal.color(QPalette::Active, QPalette::AlternateBase)));
// Buttons
@@ -1078,9 +1078,14 @@ void Qt5Frame::UpdateSettings(AllSettings& rSettings)
style.BatchSetBackgrounds(aBack);
style.SetInactiveTabColor(aBack);
+ // Workspace
+ style.SetWorkspaceColor(aMid);
+
// Selection
style.SetHighlightColor(aHigh);
style.SetHighlightTextColor(aHighText);
+ style.SetActiveColor(aHigh);
+ style.SetActiveTextColor(aHighText);
// Links
style.SetLinkColor(aLink);