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.
This commit is contained in:
Mingcong Bai 2016-01-06 20:02:56 -07:00
parent 4741c5f279
commit 2d64110150
3 changed files with 6 additions and 3 deletions

View File

@ -104,7 +104,8 @@ ProgressTreeDelegate::paintViewStep( QPainter* painter,
{ {
painter->setPen( Calamares::Branding::instance()-> painter->setPen( Calamares::Branding::instance()->
styleString( Calamares::Branding::SidebarTextSelect ) ); 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() ); painter->fillRect( option.rect, painter->brush().color() );

View File

@ -71,7 +71,8 @@ QStringList Branding::s_styleEntryStrings =
{ {
"sidebarBackground", "sidebarBackground",
"sidebarText", "sidebarText",
"sidebarTextSelect" "sidebarTextSelect",
"sidebarTextHighlight"
}; };

View File

@ -62,7 +62,8 @@ public:
{ {
SidebarBackground, SidebarBackground,
SidebarText, SidebarText,
SidebarTextSelect SidebarTextSelect,
SidebarTextHighlight
}; };
static Branding* instance(); static Branding* instance();