From 382ea91adbf4b887229e3f04085efb2ea90bd3e5 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Thu, 17 Mar 2016 20:08:37 +0100 Subject: [PATCH] #158 - support for spacers and some UI fix. --- src/gui/statusbar.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gui/statusbar.cpp b/src/gui/statusbar.cpp index 34845cd38..e0c0e6a70 100755 --- a/src/gui/statusbar.cpp +++ b/src/gui/statusbar.cpp @@ -154,10 +154,21 @@ void StatusBar::loadChangeableActions(const QStringList &action_names) { else { if (action_name == SEPARATOR_ACTION_NAME) { QLabel *lbl = new QLabel(QSL("•")); - widget_to_add = lbl; + + action_to_add = new QAction(this); + action_to_add->setSeparator(true); + action_to_add->setProperty("should_remove_action", true); + } + else if (action_name == SPACER_ACTION_NAME) { + QLabel *lbl = new QLabel(QSL("\t\t")); + widget_to_add = lbl; + action_to_add = new QAction(this); action_to_add->setProperty("should_remove_action", true); + action_to_add->setIcon(qApp->icons()->fromTheme(QSL("application-search"))); + action_to_add->setProperty("type", SPACER_ACTION_NAME); + action_to_add->setProperty("name", tr("Toolbar spacer")); } else { // Add originally toolbar action.