diff options
author | Andrea Diamantini <adjam7@gmail.com> | 2009-09-12 09:59:10 +0200 |
---|---|---|
committer | Andrea Diamantini <adjam7@gmail.com> | 2009-09-12 09:59:10 +0200 |
commit | bb0cf4fb14b5d0d49c03537b19559de52e500378 (patch) | |
tree | f25141f551e57d13c3a3eaa5ce54687d3992a8e7 /src | |
parent | Merge commit 'avaddon/master' (diff) | |
download | rekonq-bb0cf4fb14b5d0d49c03537b19559de52e500378.tar.xz |
Some "stupid" toolbars fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.cpp | 29 | ||||
-rw-r--r-- | src/mainwindow.h | 6 |
2 files changed, 18 insertions, 17 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 124406bf..e7494c0e 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -94,8 +94,8 @@ MainWindow::MainWindow() , m_findBar(new FindBar(this)) , m_sidePanel(0) , m_historyBackMenu(0) - , m_bmBar( new KToolBar( QString("BookmarkToolBar"), this, Qt::TopToolBarArea, true, false, true) ) - , m_mainBar( new KToolBar( QString("MainToolBar"), this, Qt::TopToolBarArea, true, false, false) ) + , m_mainBar( new KToolBar( QString("MainToolBar"), this, Qt::TopToolBarArea, true, true, true) ) + , m_bmBar( new KToolBar( QString("BookmarkToolBar"), this, Qt::TopToolBarArea, true, true, true) ) , m_ac( new KActionCollection(this) ) { // enable window size "auto-save" @@ -124,12 +124,6 @@ MainWindow::MainWindow() // then, setup our actions setupActions(); - // Bookmark Menu - KActionMenu *bmMenu = Application::bookmarkProvider()->bookmarkActionMenu(this); - bmMenu->setIcon(KIcon("rating")); - actionCollection()->addAction(QLatin1String("bookmarksActionMenu"), bmMenu); - ((KActionMenu *)actionByName("bookmarksActionMenu"))->setDelayed(false); - // setting Side Panel setupSidePanel(); @@ -137,7 +131,7 @@ MainWindow::MainWindow() setupTools(); // setting up rekonq toolbar(s) - setupToolbar(); + setupToolbars(); // no more status bar.. setStatusBar(0); @@ -159,12 +153,14 @@ SidePanel *MainWindow::sidePanel() } -void MainWindow::setupToolbar() +void MainWindow::setupToolbars() { // ============ Main ToolBar ================================ m_mainBar->setToolButtonStyle(Qt::ToolButtonIconOnly); - m_mainBar->setIconDimensions(22); m_mainBar->setContextMenuPolicy(Qt::PreventContextMenu); + m_mainBar->setFloatable(false); + m_mainBar->setMovable(false); + m_mainBar->addAction( actionByName(KStandardAction::name(KStandardAction::Back)) ); m_mainBar->addAction( actionByName(KStandardAction::name(KStandardAction::Forward)) ); m_mainBar->addSeparator(); @@ -176,11 +172,10 @@ void MainWindow::setupToolbar() // =========== Bookmarks ToolBar ================================ m_bmBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - m_bmBar->setIconDimensions(16); m_bmBar->setAcceptDrops(true); - m_bmBar->setContentsMargins(0, 0, 0, 0); - m_bmBar->setMinimumHeight(16); m_bmBar->setContextMenuPolicy(Qt::CustomContextMenu); + m_bmBar->setFloatable(false); + m_bmBar->setMovable(false); Application::bookmarkProvider()->setupBookmarkBar(m_bmBar); } @@ -355,6 +350,12 @@ void MainWindow::setupActions() qa->setText( i18n("Bookmarks Toolbar") ); qa->setIcon( KIcon("bookmark-toolbar") ); actionCollection()->addAction(QLatin1String("bm_bar"), qa); + + // Bookmark Menu + KActionMenu *bmMenu = Application::bookmarkProvider()->bookmarkActionMenu(this); + bmMenu->setIcon(KIcon("rating")); + bmMenu->setDelayed(false); + actionCollection()->addAction(QLatin1String("bookmarksActionMenu"), bmMenu); } diff --git a/src/mainwindow.h b/src/mainwindow.h index 21cf1a4f..5a705e27 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -73,7 +73,7 @@ public: private: void setupActions(); void setupTools(); - void setupToolbar(); + void setupToolbars(); void setupSidePanel(); SidePanel *sidePanel(); @@ -148,9 +148,9 @@ private: KAction *m_stopReloadAction; KMenu *m_historyBackMenu; - KToolBar *m_bmBar; KToolBar *m_mainBar; - + KToolBar *m_bmBar; + QString m_lastSearch; QString m_homePage; |