From 36ba5d3382e89f247b5bde2efd0aac4428c34d96 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 2 Jan 2015 17:14:02 -0800 Subject: Give more layouts reasonable names This time for the mainwindow. This includes an adjustment in the C++ code where we actually referenced one of those weird generic names. Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 11 ++++++----- qt-ui/mainwindow.ui | 14 +++++++------- 2 files changed, 13 insertions(+), 12 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 03f93a64d..08b228d4a 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -132,15 +132,16 @@ MainWindow::MainWindow() : QMainWindow(), // has no concept of "toolbar" for a non-mainwindow widget (...) // I need to take the current item that's in the toolbar Position // and reposition it alongside the grid layout. - QLayoutItem *p = ui.gridLayout->takeAt(0); - ui.gridLayout->addWidget(toolBar, 0, 0); - ui.gridLayout->addItem(p, 0, 1); + QLayoutItem *p = ui.profileInnerLayout->takeAt(0); + ui.profileInnerLayout->addWidget(toolBar, 0, 0); + ui.profileInnerLayout->addItem(p, 0, 1); // and now for some layout hackery // this gets us consistent margins everywhere and a much more balanced look QMargins margins(5, 5, 5, 5); QList dontChange; - dontChange << "notesAndSocialNetworksLayout" << ui.gridLayout->objectName(); + dontChange << "notesAndSocialNetworksLayout" << + "profileInnerLayout"; Q_FOREACH (QLayout *layout, findChildren()) { // lots of internally used layouts by Qt have no names // don't mess with those (or scroll bars look terrible, among other things @@ -153,7 +154,7 @@ MainWindow::MainWindow() : QMainWindow(), layout->setContentsMargins(margins); } margins = QMargins(0, 5, 5, 5); - ui.gridLayout->setContentsMargins(margins); + ui.profileInnerLayout->setContentsMargins(margins); updateManager = new UpdateManager(this); } diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index 08c8d3451..ca5db455c 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -11,7 +11,7 @@ - + 0 @@ -44,7 +44,7 @@ 0 - + 0 @@ -69,7 +69,7 @@ true - + 0 @@ -96,7 +96,7 @@ - + 0 @@ -127,7 +127,7 @@ 0 - + @@ -150,7 +150,7 @@ 0 - + @@ -165,7 +165,7 @@ - + -- cgit v1.2.3-70-g09d2