Commit 79a1c927 authored by Jan Möbius's avatar Jan Möbius

Removed deprecated function

parent d1b83291
......@@ -84,7 +84,7 @@ void QtColorChooserButton::paintEvent(QPaintEvent *ev) {
initStyleOption(&buttonOptions);
QStylePainter painter(this);
const int textWd = buttonOptions.fontMetrics.width(buttonOptions.text);
const int textWd = buttonOptions.fontMetrics.horizontalAdvance(buttonOptions.text);
QRect textRect = buttonOptions.rect;
textRect.setWidth(std::min(textRect.width(), textWd));
painter.drawItemText(textRect, Qt::TextSingleLine | Qt::TextShowMnemonic | Qt::AlignVCenter,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment