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>
This commit is contained in:
committed by
Michael Weghorn
parent
c4d2570b4f
commit
9dd26d7a2c
@@ -156,7 +156,7 @@ void ScCsvRuler::InitColors()
|
||||
{
|
||||
const StyleSettings& rSett = Application::GetSettings().GetStyleSettings();
|
||||
maBackColor = rSett.GetFaceColor();
|
||||
maActiveColor = rSett.GetWindowColor();
|
||||
maActiveColor = rSett.GetFieldColor();
|
||||
maTextColor = rSett.GetLabelTextColor();
|
||||
maSplitColor = maBackColor.IsDark() ? maTextColor : COL_LIGHTRED;
|
||||
InvalidateGfx();
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user