Use Branding styleStrings instead of CalamaresStyle constants.

main
Teo Mrnjavac 10 years ago
parent cc5095781d
commit e5d4c02b4a

@ -21,7 +21,6 @@
#include "ViewManager.h"
#include "progresstree/ProgressTreeView.h"
#include "utils/CalamaresUtilsGui.h"
#include "utils/CalamaresStyle.h"
#include "utils/Logger.h"
#include "utils/DebugWindow.h"
#include "utils/Retranslator.h"
@ -71,8 +70,10 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
{
QPalette plt = sideBox->palette();
sideBox->setAutoFillBackground( true );
plt.setColor( sideBox->backgroundRole(), CalamaresStyle::SIDEBAR_BACKGROUND );
plt.setColor( sideBox->foregroundRole(), CalamaresStyle::SIDEBAR_TEXT );
plt.setColor( sideBox->backgroundRole(), Calamares::Branding::instance()->
styleString( Calamares::Branding::SidebarBackground ) );
plt.setColor( sideBox->foregroundRole(), Calamares::Branding::instance()->
styleString( Calamares::Branding::SidebarText ) );
sideBox->setPalette( plt );
logoLabel->setPalette( plt );
}

@ -23,7 +23,7 @@
#include "ViewStepItem.h"
#include "ProgressTreeModel.h"
#include "ViewManager.h"
#include "utils/CalamaresStyle.h"
#include "Branding.h"
#include "utils/CalamaresUtilsGui.h"
#include <QAbstractItemView>
@ -82,8 +82,10 @@ ProgressTreeDelegate::paint( QPainter* painter,
initStyleOption( &opt, index );
opt.text.clear();
painter->setBrush( CalamaresStyle::SIDEBAR_BACKGROUND );
painter->setPen( CalamaresStyle::SIDEBAR_TEXT );
painter->setBrush( QColor( Calamares::Branding::instance()->
styleString( Calamares::Branding::SidebarBackground ) ) );
painter->setPen( QColor( Calamares::Branding::instance()->
styleString( Calamares::Branding::SidebarText ) ) );
if ( isFirstLevel )
paintCategory( painter, opt, index );
@ -135,7 +137,8 @@ ProgressTreeDelegate::paintViewStep( QPainter* painter,
if ( isCurrent )
{
painter->setPen( CalamaresStyle::SIDEBAR_TEXT_SELECT );
painter->setPen( Calamares::Branding::instance()->
styleString( Calamares::Branding::SidebarTextSelect ) );
painter->setBrush( APP->mainWindow()->palette().background() );
}

@ -20,7 +20,7 @@
#include "ProgressTreeDelegate.h"
#include "ViewManager.h"
#include "utils/CalamaresStyle.h"
#include "Branding.h"
ProgressTreeView* ProgressTreeView::s_instance = nullptr;
@ -54,7 +54,8 @@ ProgressTreeView::ProgressTreeView( QWidget* parent )
setItemDelegate( m_delegate );
QPalette plt = palette();
plt.setColor( QPalette::Base, CalamaresStyle::SIDEBAR_BACKGROUND );
plt.setColor( QPalette::Base, Calamares::Branding::instance()->
styleString( Calamares::Branding::SidebarBackground ) );
setPalette( plt );
}

Loading…
Cancel
Save