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

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

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

Loading…
Cancel
Save