mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
Remove use of QFontMetrics width
This commit is contained in:
@@ -143,7 +143,7 @@ QWidget* PdmUiColorEditor::createEditorWidget(QWidget * parent)
|
||||
QFontMetrics fontMetrics = QApplication::fontMetrics();
|
||||
|
||||
buttonLayout->addWidget(m_colorPreviewLabel);
|
||||
m_colorSelectionButton->setMinimumWidth(fontMetrics.width(m_colorPreviewLabel->text()) + 15);
|
||||
m_colorSelectionButton->setMinimumWidth(fontMetrics.boundingRect(m_colorPreviewLabel->text()).width() + 15);
|
||||
|
||||
layout->addWidget(m_colorTextLabel);
|
||||
layout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Ignored));
|
||||
|
||||
Reference in New Issue
Block a user