From 2d641101502e0455625c436f574077aec45076cc Mon Sep 17 00:00:00 2001 From: Mingcong Bai Date: Wed, 6 Jan 2016 20:02:56 -0700 Subject: [PATCH] calamares: sidebarTextHighlight for branding This commit adds support for distribution to define sidebarTextHighlight to their branding.desc file, to control the left panel (sidebar) with highlight behind the current step (isCurrent) text label. --- src/calamares/progresstree/ProgressTreeDelegate.cpp | 3 ++- src/libcalamaresui/Branding.cpp | 3 ++- src/libcalamaresui/Branding.h | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/calamares/progresstree/ProgressTreeDelegate.cpp b/src/calamares/progresstree/ProgressTreeDelegate.cpp index 4b2ab65bb..e9f56e23f 100644 --- a/src/calamares/progresstree/ProgressTreeDelegate.cpp +++ b/src/calamares/progresstree/ProgressTreeDelegate.cpp @@ -104,7 +104,8 @@ ProgressTreeDelegate::paintViewStep( QPainter* painter, { painter->setPen( Calamares::Branding::instance()-> styleString( Calamares::Branding::SidebarTextSelect ) ); - painter->setBrush( APP->mainWindow()->palette().background() ); + painter->setBrush( QColor( Calamares::Branding::instance()-> + styleString( Calamares::Branding::SidebarTextHighlight ) ) ); } painter->fillRect( option.rect, painter->brush().color() ); diff --git a/src/libcalamaresui/Branding.cpp b/src/libcalamaresui/Branding.cpp index b6cf09321..08e9c1709 100644 --- a/src/libcalamaresui/Branding.cpp +++ b/src/libcalamaresui/Branding.cpp @@ -71,7 +71,8 @@ QStringList Branding::s_styleEntryStrings = { "sidebarBackground", "sidebarText", - "sidebarTextSelect" + "sidebarTextSelect", + "sidebarTextHighlight" }; diff --git a/src/libcalamaresui/Branding.h b/src/libcalamaresui/Branding.h index 45afc8531..c65d48aaf 100644 --- a/src/libcalamaresui/Branding.h +++ b/src/libcalamaresui/Branding.h @@ -62,7 +62,8 @@ public: { SidebarBackground, SidebarText, - SidebarTextSelect + SidebarTextSelect, + SidebarTextHighlight }; static Branding* instance();