Mercurial > hg > easyhg
diff src/mainwindow.cpp @ 543:a220f99f1134 fswatcher
Remove Refresh button from toolbar, adjust spacing
author | Chris Cannam |
---|---|
date | Tue, 14 Feb 2012 17:27:34 +0000 |
parents | 7829da6abe97 |
children | bb98b65b23c9 |
line wrap: on
line diff
--- a/src/mainwindow.cpp Tue Feb 14 16:48:01 2012 +0000 +++ b/src/mainwindow.cpp Tue Feb 14 17:27:34 2012 +0000 @@ -3006,22 +3006,19 @@ { int sz = 32; - m_fileToolBar = addToolBar(tr("File")); - m_fileToolBar->setIconSize(QSize(sz, sz)); - m_fileToolBar->addAction(m_openAct); - m_fileToolBar->addAction(m_hgRefreshAct); - m_fileToolBar->setMovable(false); - - m_repoToolBar = addToolBar(tr("Remote")); - m_repoToolBar->setIconSize(QSize(sz, sz)); - m_repoToolBar->addAction(m_hgIncomingAct); - m_repoToolBar->addAction(m_hgPullAct); - m_repoToolBar->addAction(m_hgPushAct); - m_repoToolBar->setMovable(false); + bool spacingReqd = false; +#ifndef Q_OS_MAC + spacingReqd = true; +#endif m_workFolderToolBar = addToolBar(tr("Work")); addToolBar(Qt::LeftToolBarArea, m_workFolderToolBar); m_workFolderToolBar->setIconSize(QSize(sz, sz)); + if (spacingReqd) { + QWidget *w = new QWidget; + w->setFixedHeight(6); + m_workFolderToolBar->addWidget(w); + } m_workFolderToolBar->addAction(m_hgFolderDiffAct); m_workFolderToolBar->addSeparator(); m_workFolderToolBar->addAction(m_hgRevertAct); @@ -3033,6 +3030,17 @@ m_workFolderToolBar->addAction(m_hgRemoveAct); m_workFolderToolBar->setMovable(false); + m_repoToolBar = addToolBar(tr("Remote")); + m_repoToolBar->setIconSize(QSize(sz, sz)); + if (spacingReqd) m_repoToolBar->addWidget(new QLabel(" ")); + m_repoToolBar->addAction(m_openAct); + if (spacingReqd) m_repoToolBar->addWidget(new QLabel(" ")); + m_repoToolBar->addSeparator(); + m_repoToolBar->addAction(m_hgIncomingAct); + m_repoToolBar->addAction(m_hgPullAct); + m_repoToolBar->addAction(m_hgPushAct); + m_repoToolBar->setMovable(false); + updateToolBarStyle(); }