diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-01-04 07:15:23 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-04 07:15:23 -0800 |
commit | a308d2b7b44e7ab62ced3b31e19a68f7b8a76dbf (patch) | |
tree | 6c3bfd8ebe8d6b2a0251f7fb16d5b3622fa2034f /qt-ui/mainwindow.cpp | |
parent | 71f3a2981942808af58befa4987ac3546cf04391 (diff) | |
download | subsurface-a308d2b7b44e7ab62ced3b31e19a68f7b8a76dbf.tar.gz |
Fix toolbar icon size issue
Instead of messing with the margin (which didn't work, anyway), we need to
set the size of the icons. Apparently on Linux this was implicitly done,
but on Mac it didn't scale the icons and provided space for the largest
one (and we have a couple that are twice as big as the others).
What we really need are scalable icons that allow us to set the icon size
relative to the font size. But for now this solves the ugliness on Mac.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 01968e943..5f59304f9 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -127,9 +127,7 @@ MainWindow::MainWindow() : QMainWindow(), Q_FOREACH (QAction *a, profileToolbarActions) toolBar->addAction(a); toolBar->setOrientation(Qt::Vertical); - QMargins margins(5, 5, -5, 5); - toolBar->setContentsMargins(margins); - + toolBar->setIconSize(QSize(24,24)); // since I'm adding the toolBar by hand, because designer // has no concept of "toolbar" for a non-mainwindow widget (...) // I need to take the current item that's in the toolbar Position @@ -140,7 +138,7 @@ MainWindow::MainWindow() : QMainWindow(), // and now for some layout hackery // this gets us consistent margins everywhere and a much more balanced look - margins = QMargins(5, 5, 5, 5); + QMargins margins(5, 5, 5, 5); QMargins zeroMargin(0, 0, 0, 0); QList<QString> noMarginList; noMarginList << "notesAndSocialNetworksLayout" << |