From 7482e0540d583d7f2175cec42da3437a0f49751e Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 2 Jan 2015 20:34:16 -0800 Subject: 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 --- qt-ui/mainwindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'qt-ui/mainwindow.cpp') 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 dontChange; dontChange << "notesAndSocialNetworksLayout" << "mainTabOuterLayout" << "ratingVisibilityWidgets" << + "temperatureLabels" << + "airWaterTempLayout" << "profileInnerLayout"; Q_FOREACH (QLayout *layout, findChildren()) { // 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); -- cgit v1.2.3-70-g09d2