[libcalamaresui] Improve naming, resolve TODO

This commit is contained in:
Adriaan de Groot 2022-05-04 00:51:50 +02:00
parent 992d2d3be0
commit a7d3630e42
3 changed files with 7 additions and 9 deletions

View File

@ -46,12 +46,12 @@ Rectangle {
Layout.fillWidth: true; Layout.fillWidth: true;
height: 35; height: 35;
radius: 6; radius: 6;
color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarBackgroundSelected : Branding.SidebarBackground ); color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarBackgroundCurrent : Branding.SidebarBackground );
Text { Text {
anchors.verticalCenter: parent.verticalCenter; anchors.verticalCenter: parent.verticalCenter;
anchors.horizontalCenter: parent.horizontalCenter; anchors.horizontalCenter: parent.horizontalCenter;
color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarTextSelected : Branding.SidebarText ); color: Branding.styleString( index == ViewManager.currentStepIndex ? Branding.SidebarTextCurrent : Branding.SidebarText );
text: display; text: display;
} }
} }
@ -77,7 +77,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter; anchors.verticalCenter: parent.verticalCenter;
x: parent.x + 4; x: parent.x + 4;
text: qsTr("Show debug information") text: qsTr("Show debug information")
color: Branding.styleString( mouseArea.containsMouse ? Branding.SidebarTextSelect : Branding.SidebarBackground ); color: Branding.styleString( mouseArea.containsMouse ? Branding.SidebarTextCurrent : Branding.SidebarBackground );
font.pointSize : 9 font.pointSize : 9
} }

View File

@ -36,9 +36,9 @@ paintViewStep( QPainter* painter, const QStyleOptionViewItem& option, const QMod
if ( index.row() == index.data( Calamares::ViewManager::ProgressTreeItemCurrentIndex ).toInt() ) if ( index.row() == index.data( Calamares::ViewManager::ProgressTreeItemCurrentIndex ).toInt() )
{ {
painter->setPen( Calamares::Branding::instance()->styleString( Calamares::Branding::SidebarTextSelect ) ); painter->setPen( Calamares::Branding::instance()->styleString( Calamares::Branding::SidebarTextCurrent ) );
QString textHighlight QString textHighlight
= Calamares::Branding::instance()->styleString( Calamares::Branding::SidebarTextHighlight ); = Calamares::Branding::instance()->styleString( Calamares::Branding::SidebarBackgroundCurrent );
if ( textHighlight.isEmpty() ) if ( textHighlight.isEmpty() )
{ {
painter->setBrush( CalamaresApplication::instance()->mainWindow()->palette().window() ); painter->setBrush( CalamaresApplication::instance()->mainWindow()->palette().window() );

View File

@ -76,10 +76,8 @@ public:
{ {
SidebarBackground, SidebarBackground,
SidebarText, SidebarText,
SidebarTextSelect, SidebarTextCurrent,
SidebarTextSelected = SidebarTextSelect, // TODO:3.3:Remove SidebarTextSelect SidebarBackgroundCurrent,
SidebarTextHighlight,
SidebarBackgroundSelected = SidebarTextHighlight // TODO:3.3:Remove SidebarTextHighlight
}; };
Q_ENUM( StyleEntry ) Q_ENUM( StyleEntry )