diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-05-25 20:04:31 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-25 20:07:36 -0700 |
commit | 81e27b6db9aba39dd80d7c9ec5ae6e01d5966075 (patch) | |
tree | b31eaf723c73595dd9cb89e51a6ad19321c51371 /qt-ui/maintab.cpp | |
parent | 4409d61f7c4576497a60b7e50d0c81e2f20b826a (diff) | |
download | subsurface-81e27b6db9aba39dd80d7c9ec5ae6e01d5966075.tar.gz |
Try to make the equipment tab more compact
My attempts to actually set the width of the columns with the
SizeHintRole all failed - so I gave up on that and am forcing things to
work by making the texts in the header somewhat longer and then resizing
to that. Definitely not what I wanted to do - but that plus reducing the
font size gives us a much more reasonable / compact look.
I really hope that someone else can explain to me how to get the
SizeHintRole to affect the width (and not just the height - that part
worked just fine) of a the cells in a column. Then we can replace this
hack by a much better solution (that won't fail if the translated strings
look different).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 4710c048a..ca2f18ef0 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -80,7 +80,8 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), connect(ui->weights, SIGNAL(clicked(QModelIndex)), ui->weights->model(), SLOT(remove(QModelIndex))); ui->cylinders->setColumnWidth(CylindersModel::REMOVE, 24); - ui->cylinders->horizontalHeader()->setResizeMode (CylindersModel::REMOVE , QHeaderView::Fixed); + ui->cylinders->horizontalHeader()->setResizeMode(QHeaderView::ResizeToContents); + ui->cylinders->horizontalHeader()->setResizeMode(CylindersModel::REMOVE, QHeaderView::Fixed); ui->cylinders->setItemDelegateForColumn(CylindersModel::TYPE, new TankInfoDelegate()); ui->weights->setColumnWidth(WeightModel::REMOVE, 24); ui->weights->horizontalHeader()->setResizeMode (WeightModel::REMOVE , QHeaderView::Fixed); |