From 3070cec1ba14b9978035f2ba91fec1d94907ffed Mon Sep 17 00:00:00 2001 From: Steffen Baranowsky Date: Mon, 6 Feb 2017 14:38:28 +0100 Subject: [PATCH] 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 --- data/themes/default/style.css | 2 +- src/gui/widgets/SideBar.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/themes/default/style.css b/data/themes/default/style.css index d8566225913..8d328c88351 100644 --- a/data/themes/default/style.css +++ b/data/themes/default/style.css @@ -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; } diff --git a/src/gui/widgets/SideBar.cpp b/src/gui/widgets/SideBar.cpp index 11f229362c3..2e6c2f0483f 100644 --- a/src/gui/widgets/SideBar.cpp +++ b/src/gui/widgets/SideBar.cpp @@ -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 );