SideBarButton set text below the icon (#3256)

* SideBarButton set text below the icon

* change color of checked sidebarbutton

* adds a space to the sideBarButton title

* add gradient to checked side bar button

* whitespaces
This commit is contained in:
Steffen Baranowsky
2017-02-06 14:38:28 +01:00
committed by Tres Finocchiaro
parent 9e85d7c66e
commit 3070cec1ba
2 changed files with 3 additions and 2 deletions

View File

@@ -494,7 +494,7 @@ SideBar QToolButton:pressed {
}
SideBar QToolButton:checked {
background: none;
background: qlineargradient(spread:reflect, x1:0, y1:0, x2:0, y2:1, stop:0 #4b525b, stop:1 #2f333a);
border: none;
font-size: 12px;
}

View File

@@ -110,8 +110,9 @@ SideBar::~SideBar()
void SideBar::appendTab( SideBarWidget *widget )
{
SideBarButton *button = new SideBarButton( orientation(), this );
button->setText( widget->title() );
button->setText( " " + widget->title() );
button->setIcon( widget->icon() );
button->setLayoutDirection( Qt::RightToLeft );
button->setCheckable( true );
m_widgets[button] = widget;
m_btnGroup.addButton( button );