mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
4409d61f7c
commit
81e27b6db9
2 changed files with 50 additions and 13 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue