comparison 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
comparison
equal deleted inserted replaced
542:7829da6abe97 543:a220f99f1134
3004 3004
3005 void MainWindow::createToolBars() 3005 void MainWindow::createToolBars()
3006 { 3006 {
3007 int sz = 32; 3007 int sz = 32;
3008 3008
3009 m_fileToolBar = addToolBar(tr("File")); 3009 bool spacingReqd = false;
3010 m_fileToolBar->setIconSize(QSize(sz, sz)); 3010 #ifndef Q_OS_MAC
3011 m_fileToolBar->addAction(m_openAct); 3011 spacingReqd = true;
3012 m_fileToolBar->addAction(m_hgRefreshAct); 3012 #endif
3013 m_fileToolBar->setMovable(false);
3014
3015 m_repoToolBar = addToolBar(tr("Remote"));
3016 m_repoToolBar->setIconSize(QSize(sz, sz));
3017 m_repoToolBar->addAction(m_hgIncomingAct);
3018 m_repoToolBar->addAction(m_hgPullAct);
3019 m_repoToolBar->addAction(m_hgPushAct);
3020 m_repoToolBar->setMovable(false);
3021 3013
3022 m_workFolderToolBar = addToolBar(tr("Work")); 3014 m_workFolderToolBar = addToolBar(tr("Work"));
3023 addToolBar(Qt::LeftToolBarArea, m_workFolderToolBar); 3015 addToolBar(Qt::LeftToolBarArea, m_workFolderToolBar);
3024 m_workFolderToolBar->setIconSize(QSize(sz, sz)); 3016 m_workFolderToolBar->setIconSize(QSize(sz, sz));
3017 if (spacingReqd) {
3018 QWidget *w = new QWidget;
3019 w->setFixedHeight(6);
3020 m_workFolderToolBar->addWidget(w);
3021 }
3025 m_workFolderToolBar->addAction(m_hgFolderDiffAct); 3022 m_workFolderToolBar->addAction(m_hgFolderDiffAct);
3026 m_workFolderToolBar->addSeparator(); 3023 m_workFolderToolBar->addSeparator();
3027 m_workFolderToolBar->addAction(m_hgRevertAct); 3024 m_workFolderToolBar->addAction(m_hgRevertAct);
3028 m_workFolderToolBar->addAction(m_hgUpdateAct); 3025 m_workFolderToolBar->addAction(m_hgUpdateAct);
3029 m_workFolderToolBar->addAction(m_hgCommitAct); 3026 m_workFolderToolBar->addAction(m_hgCommitAct);
3030 m_workFolderToolBar->addAction(m_hgMergeAct); 3027 m_workFolderToolBar->addAction(m_hgMergeAct);
3031 m_workFolderToolBar->addSeparator(); 3028 m_workFolderToolBar->addSeparator();
3032 m_workFolderToolBar->addAction(m_hgAddAct); 3029 m_workFolderToolBar->addAction(m_hgAddAct);
3033 m_workFolderToolBar->addAction(m_hgRemoveAct); 3030 m_workFolderToolBar->addAction(m_hgRemoveAct);
3034 m_workFolderToolBar->setMovable(false); 3031 m_workFolderToolBar->setMovable(false);
3032
3033 m_repoToolBar = addToolBar(tr("Remote"));
3034 m_repoToolBar->setIconSize(QSize(sz, sz));
3035 if (spacingReqd) m_repoToolBar->addWidget(new QLabel(" "));
3036 m_repoToolBar->addAction(m_openAct);
3037 if (spacingReqd) m_repoToolBar->addWidget(new QLabel(" "));
3038 m_repoToolBar->addSeparator();
3039 m_repoToolBar->addAction(m_hgIncomingAct);
3040 m_repoToolBar->addAction(m_hgPullAct);
3041 m_repoToolBar->addAction(m_hgPushAct);
3042 m_repoToolBar->setMovable(false);
3035 3043
3036 updateToolBarStyle(); 3044 updateToolBarStyle();
3037 } 3045 }
3038 3046
3039 void MainWindow::updateToolBarStyle() 3047 void MainWindow::updateToolBarStyle()