]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Update the size of the menu toolbar-item
authorPeter Penz <peter.penz19@gmail.com>
Sun, 27 Mar 2011 17:07:14 +0000 (19:07 +0200)
committerPeter Penz <peter.penz19@gmail.com>
Sun, 27 Mar 2011 17:07:14 +0000 (19:07 +0200)
If the icon size of the toolbar has been changed, the manually added
menu toolbar-item must be updated.

src/dolphinmainwindow.cpp
src/dolphinmainwindow.h

index 1fb9b63e7aeb12f4b7acef2cb5f1cfb0d4f0ced3..e5cc9901f2603e2e4b74df910307a6a45b1defdf 100644 (file)
@@ -1429,6 +1429,13 @@ void DolphinMainWindow::slotToolBarMenuButtonDeleted()
     m_updateToolBarTimer->start();
 }
 
     m_updateToolBarTimer->start();
 }
 
+void DolphinMainWindow::slotToolBarIconSizeChanged(const QSize& iconSize)
+{
+    if (m_openToolBarMenuButton) {
+        m_openToolBarMenuButton->setIconSize(iconSize);
+    }
+}
+
 void DolphinMainWindow::init()
 {
     DolphinSettings& settings = DolphinSettings::instance();
 void DolphinMainWindow::init()
 {
     DolphinSettings& settings = DolphinSettings::instance();
@@ -1973,6 +1980,7 @@ void DolphinMainWindow::createToolBarMenuButton()
 
     toolBar()->addWidget(m_toolBarSpacer);
     toolBar()->addWidget(m_openToolBarMenuButton);
 
     toolBar()->addWidget(m_toolBarSpacer);
     toolBar()->addWidget(m_openToolBarMenuButton);
+    connect(toolBar(), SIGNAL(iconSizeChanged(QSize)), this, SLOT(slotToolBarIconSizeChanged(QSize)));
 
     // The added widgets are owned by the toolbar and may get deleted when e.g. the toolbar
     // gets edited. In this case we must add them again. The adding is done asynchronously by
 
     // The added widgets are owned by the toolbar and may get deleted when e.g. the toolbar
     // gets edited. In this case we must add them again. The adding is done asynchronously by
index a242a654605768a92e67266f14f2aab206c6f8ed..10fcf57fd32daa9278983588777795b9bf5f2842 100644 (file)
@@ -443,6 +443,7 @@ private slots:
     void updateToolBar();
     void slotToolBarSpacerDeleted();
     void slotToolBarMenuButtonDeleted();
     void updateToolBar();
     void slotToolBarSpacerDeleted();
     void slotToolBarMenuButtonDeleted();
+    void slotToolBarIconSizeChanged(const QSize& iconSize);
 
 private:
     DolphinMainWindow(int id);
 
 private:
     DolphinMainWindow(int id);