summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-23 10:16:11 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-23 10:16:11 -0800
commit87febd33be364c3cf6ce9455c383ba4e9f974fd9 (patch)
treefea91d835d9ad5c6cd29b754acc359a697e21092 /qt-ui
parentaff1bac497f1e84c3a173c7a227a1735a28f943a (diff)
downloadsubsurface-87febd33be364c3cf6ce9455c383ba4e9f974fd9.tar.gz
Carefully create some forced margins
We don't want to waste space, but we don't want things to be too crammed together, either. Especially not having horizontal margins for text can look very awkward. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/maintab.cpp7
-rw-r--r--qt-ui/maintab.ui6
2 files changed, 10 insertions, 3 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 898166328..cd85418a8 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -155,6 +155,13 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
box->setStyleSheet(gnomeCss);
}
}
+ // QLineEdit and QLabels should have minimal margin on the left and right but not waste vertical space
+ QMargins margins(1, 0, 1, 0);
+ ui.location->setContentsMargins(margins);
+ ui.suit->setContentsMargins(margins);
+ Q_FOREACH (QLabel *label, findChildren<QLabel *>()) {
+ label->setContentsMargins(margins);
+ }
ui.cylinders->view()->horizontalHeader()->setContextMenuPolicy(Qt::ActionsContextMenu);
QSettings s;
diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui
index 47adbf73c..3450224ac 100644
--- a/qt-ui/maintab.ui
+++ b/qt-ui/maintab.ui
@@ -43,13 +43,13 @@
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="leftMargin">
- <number>0</number>
+ <number>2</number>
</property>
<property name="topMargin">
- <number>0</number>
+ <number>1</number>
</property>
<property name="rightMargin">
- <number>0</number>
+ <number>2</number>
</property>
<property name="bottomMargin">
<number>0</number>