Review TabLabel UI. Fix #2055
This commit is contained in:
parent
f4c4d13f6d
commit
f89c56d864
2 changed files with 20 additions and 12 deletions
|
|
@ -8,14 +8,6 @@ Ui::TabLabel::TabLabel(QString icon, QString name) :
|
|||
ui->setupUi(this);
|
||||
ui->icon->setText("<img src=':/" + icon + "' height='16' width='16' />");
|
||||
ui->name->setText(name);
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Make sure to properly set the tab label height depending |
|
||||
| on the font in use. |
|
||||
\*---------------------------------------------------------*/
|
||||
QFontMetrics fontMetrics(font());
|
||||
QRect rect = fontMetrics.boundingRect(0, 0, width(), height(), Qt::TextWordWrap | Qt::TextExpandTabs, name);
|
||||
setFixedHeight(std::max(rect.height(), ui->icon->height()));
|
||||
}
|
||||
|
||||
Ui::TabLabel::~TabLabel()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue