mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
actually use defaultIconSize()
Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5a2db2db4b
commit
72b256de62
3 changed files with 8 additions and 21 deletions
|
@ -16,12 +16,8 @@ TableView::TableView(QWidget *parent) : QWidget(parent)
|
|||
QFontMetrics fm(defaultModelFont());
|
||||
int text_ht = fm.height();
|
||||
int text_em = fm.width('m');
|
||||
// icon size is the closest multiple of 16 to the font height
|
||||
metrics.icon_size = (text_ht + 8)/16;
|
||||
metrics.icon_size *= 16;
|
||||
// enforce a minimum size
|
||||
if (metrics.icon_size < 16)
|
||||
metrics.icon_size = 16;
|
||||
// set icon and button size from the default icon size
|
||||
metrics.icon_size = defaultIconSize(text_ht);
|
||||
metrics.btn_size = metrics.icon_size + metrics.icon_size/2;
|
||||
metrics.btn_gap = metrics.icon_size/8;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue