summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorSahil Gautam <sahil@libreoffice.org>2024-09-05 01:37:44 +0530
committerMichael Weghorn <m.weghorn@posteo.de>2024-09-05 21:33:35 +0200
commit9dd26d7a2cc6b314dcc0b52000e0475bb4ced57d (patch)
tree7104bf60e81123c99882f13fb8007d5113625996 /vcl
parentc4d2570b4f1830d733f3569d6cd3e4eb6c09a9cb (diff)
Libreoffice Theme Part 0: Read correct colors from qt based VCL_PLUGINS
See `QtFrame::UpdateSettings()`, where `StyleSettings::WindowColor` is set to aBase (QPalette::Base) and `StyleSettings::DialogColor` is set to WindowColor in a call to `StyleSettings::BatchSetBackgrounds`. The issue is that without this patch in place, "GetWindowColor()" doesn't return the color of the window, instead it returns the "base color" from QPalette. It had some unintendedd consequences like the "Animation Panel" in the Impress's Animations sidebar not being painted with the correct color, as it was expecting the old WindowColor. This patch also fixes that by changing WindowColor to FieldColor in `SalInstanceWidget::set_stack_background()` https://gerrit.libreoffice.org/c/core/+/168901/comment/0e5201bd_2cae07b9/ Change-Id: I36f8c5efd8c3e87ded19a1efc00ed9c69a7fccf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171916 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qt5/QtFrame.cxx2
-rw-r--r--vcl/source/app/salvtables.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index f1aa98e8cddd..7723967c1537 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -1130,7 +1130,6 @@ void QtFrame::UpdateSettings(AllSettings& rSettings)
// Base
style.SetFieldColor(aBase);
- style.SetWindowColor(aBase);
style.SetActiveTabColor(aBase);
style.SetListBoxWindowBackgroundColor(aBase);
style.SetAlternatingRowColor(toColor(pal.color(QPalette::Active, QPalette::AlternateBase)));
@@ -1163,6 +1162,7 @@ void QtFrame::UpdateSettings(AllSettings& rSettings)
// Background
style.BatchSetBackgrounds(aBack);
style.SetInactiveTabColor(aBack);
+ style.SetWindowColor(aBack);
// Workspace
style.SetWorkspaceColor(aMid);
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index d3b4152738ab..728f2ec8428d 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -715,7 +715,7 @@ void SalInstanceWidget::get_property_tree(tools::JsonWriter& rJsonWriter)
void SalInstanceWidget::set_stack_background()
{
- set_background(m_xWidget->GetSettings().GetStyleSettings().GetWindowColor());
+ set_background(m_xWidget->GetSettings().GetStyleSettings().GetFieldColor());
}
void SalInstanceWidget::set_title_background()