From: Peter Penz Date: Sun, 27 Mar 2011 17:07:14 +0000 (+0200) Subject: Update the size of the menu toolbar-item X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/c80b261505d513dda50f54ab6ececa5cf9ca2d28 Update the size of the menu toolbar-item If the icon size of the toolbar has been changed, the manually added menu toolbar-item must be updated. --- diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 1fb9b63e7..e5cc9901f 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1429,6 +1429,13 @@ void DolphinMainWindow::slotToolBarMenuButtonDeleted() m_updateToolBarTimer->start(); } +void DolphinMainWindow::slotToolBarIconSizeChanged(const QSize& iconSize) +{ + if (m_openToolBarMenuButton) { + m_openToolBarMenuButton->setIconSize(iconSize); + } +} + void DolphinMainWindow::init() { DolphinSettings& settings = DolphinSettings::instance(); @@ -1973,6 +1980,7 @@ void DolphinMainWindow::createToolBarMenuButton() 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 diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index a242a6546..10fcf57fd 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -443,6 +443,7 @@ private slots: void updateToolBar(); void slotToolBarSpacerDeleted(); void slotToolBarMenuButtonDeleted(); + void slotToolBarIconSizeChanged(const QSize& iconSize); private: DolphinMainWindow(int id);