summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-02 20:34:16 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-02 22:24:50 -0800
commit7482e0540d583d7f2175cec42da3437a0f49751e (patch)
treea965adec267444b37e54ff0bdb02c86ddfc9a604 /qt-ui
parentbdaaf23a82ab3926abdff0650b1af6d7f705fd61 (diff)
downloadsubsurface-7482e0540d583d7f2175cec42da3437a0f49751e.tar.gz
Layout fine tuning. Exclude a few more layouts.
The goal is to have things look as consistent as possible - so if some elements have another nested level of layouts, their margins need to be zero. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 500c0508a..3409b5c7f 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -127,6 +127,8 @@ MainWindow::MainWindow() : QMainWindow(),
Q_FOREACH (QAction *a, profileToolbarActions)
toolBar->addAction(a);
toolBar->setOrientation(Qt::Vertical);
+ QMargins margins(5, 5, -5, 5);
+ toolBar->setContentsMargins(margins);
// since I'm adding the toolBar by hand, because designer
// has no concept of "toolbar" for a non-mainwindow widget (...)
@@ -138,11 +140,13 @@ MainWindow::MainWindow() : QMainWindow(),
// and now for some layout hackery
// this gets us consistent margins everywhere and a much more balanced look
- QMargins margins(5, 5, 5, 5);
+ margins = QMargins(5, 5, 5, 5);
QList<QString> dontChange;
dontChange << "notesAndSocialNetworksLayout" <<
"mainTabOuterLayout" <<
"ratingVisibilityWidgets" <<
+ "temperatureLabels" <<
+ "airWaterTempLayout" <<
"profileInnerLayout";
Q_FOREACH (QLayout *layout, findChildren<QLayout *>()) {
// lots of internally used layouts by Qt have no names
@@ -157,7 +161,7 @@ MainWindow::MainWindow() : QMainWindow(),
}
margins = QMargins(0, 5, 5, 5);
ui.profileInnerLayout->setContentsMargins(margins);
- margins = QMargins(5, 5, 0, 5);
+ margins = QMargins(0, 0, 0, 0);
ui.profileOuterLayout->setContentsMargins(margins);
updateManager = new UpdateManager(this);