aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Haumann <dhaumann@kde.org>2014-01-23 00:14:26 (GMT)
committerDominik Haumann <dhaumann@kde.org>2014-01-23 00:14:26 (GMT)
commit81ecf94bcb5964cd6eec21a84aa69669c3513488 (patch)
treeceb4ba879648b3123eda9215b1998e490313bc1e
parent2b6c02a54c61639adea0b2e46d7f0ec298debc11 (diff)
use popup menu in view space bar
Unfortuantely, the Oxygen (frameworks 5) style paints the "down" arrow for a QToolButton without text behind the icon, which looks wrong: http://wstaw.org/m/2014/01/23/plasma-desktopWX2364.png Can we do anything about it? :-) CCMAIL: hugo.pereira@free.fr
-rw-r--r--kate/app/kateviewspace.cpp16
1 files changed, 6 insertions, 10 deletions
diff --git a/kate/app/kateviewspace.cpp b/kate/app/kateviewspace.cpp
index 5d0a37b..f526ad8 100644
--- a/kate/app/kateviewspace.cpp
+++ b/kate/app/kateviewspace.cpp
@@ -59,16 +59,12 @@ KateViewSpace::KateViewSpace( KateViewManager *viewManager,
// add vertical split view space
QToolButton * split = new QToolButton(this);
split->setAutoRaise(true);
- split->setDefaultAction(m_viewManager->mainWindow()->actionCollection()->action(QStringLiteral("view_split_vert")));
- split->setWhatsThis(i18n("Split this view horizontally into two views."));
- split->installEventFilter(this); // on click, active this view space
- hLayout->addWidget(split);
-
- // add horizontally split view space
- split = new QToolButton(this);
- split->setAutoRaise(true);
- split->setDefaultAction(m_viewManager->mainWindow()->actionCollection()->action(QStringLiteral("view_split_horiz")));
- split->setWhatsThis(i18n("Split this view vertically into two views."));
+ split->setPopupMode(QToolButton::InstantPopup);
+ split->setIcon(QIcon::fromTheme(QStringLiteral("view-split-left-right")));
+ split->addAction(m_viewManager->mainWindow()->actionCollection()->action(QStringLiteral("view_split_vert")));
+ split->addAction(m_viewManager->mainWindow()->actionCollection()->action(QStringLiteral("view_split_horiz")));
+ split->addAction(m_viewManager->mainWindow()->actionCollection()->action(QStringLiteral("view_close_current_space")));
+ split->setWhatsThis(i18n("Control view space splitting"));
split->installEventFilter(this); // on click, active this view space
hLayout->addWidget(split);