diff options
| author | Peter Penz <[email protected]> | 2011-03-27 19:07:14 +0200 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2011-03-27 19:07:14 +0200 |
| commit | c80b261505d513dda50f54ab6ececa5cf9ca2d28 (patch) | |
| tree | 3396cc73a9ecd35eadcee31643c3ecabb8f57f21 /src | |
| parent | 5647aab1e3aaa3933a3c7dbb53a262849f63a8f9 (diff) | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 8 | ||||
| -rw-r--r-- | src/dolphinmainwindow.h | 1 |
2 files changed, 9 insertions, 0 deletions
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); |
