From e91345d7cbec52db99a43db064f0cd6d69a646e2 Mon Sep 17 00:00:00 2001 From: Manuel Nickschas Date: Tue, 14 Jul 2009 22:25:21 +0200 Subject: [PATCH] Use KToolBar instead of QToolBar for KDEified Quassel This basically gives you the common context menu to change icon size and if/where to display the texts. It also should honor your global appearance setting by default. --- src/qtui/mainwin.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/qtui/mainwin.cpp b/src/qtui/mainwin.cpp index 1e74e18d..b6f4dc8b 100644 --- a/src/qtui/mainwin.cpp +++ b/src/qtui/mainwin.cpp @@ -26,6 +26,7 @@ # include # include # include +# include #endif #ifdef Q_WS_X11 @@ -626,20 +627,18 @@ void MainWin::setupToolBars() { #ifdef Q_WS_MAC setUnifiedTitleAndToolBarOnMac(true); #endif - _mainToolBar = addToolBar(tr("Main Toolbar")); + +#ifdef HAVE_KDE + _mainToolBar = new KToolBar("MainToolBar", this, Qt::TopToolBarArea, false, true, true); +#else + _mainToolBar = new QToolBar(this); _mainToolBar->setObjectName("MainToolBar"); +#endif + _mainToolBar->setWindowTitle(tr("Main Toolbar")); + addToolBar(_mainToolBar); QtUi::toolBarActionProvider()->addActions(_mainToolBar, ToolBarActionProvider::MainToolBar); _toolbarMenu->addAction(_mainToolBar->toggleViewAction()); - - //_nickToolBar = addToolBar("User"); - //_nickToolBar->setObjectName("NickToolBar"); - //QtUi::toolBarActionProvider()->addActions(_nickToolBar, ToolBarActionProvider::NickToolBar); - -#ifdef HAVE_KDE - _mainToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); - //_nickToolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); -#endif } void MainWin::connectedToCore() { -- 2.20.1