fixed settingsdialogtab image being offset

This commit is contained in:
fourtf 2018-01-13 02:17:07 +01:00
parent 9703cf6ad4
commit cec6f7ce9d

View file

@ -50,11 +50,11 @@ void SettingsDialogTab::paintEvent(QPaintEvent *)
int a = (this->height() - 20) / 2; int a = (this->height() - 20) / 2;
QPixmap pixmap = this->ui.icon.pixmap(QSize(20, 20)); QPixmap pixmap = this->ui.icon.pixmap(QSize(20, 20));
painter.drawPixmap(0, a + a, pixmap); painter.drawPixmap(a, a, pixmap);
a = a + a + 20; a = a + a + 20;
painter.drawText(QRect(a, 0, width() - a, height()), this->ui.labelText, painter.drawText(QRect(a + a, 0, width() - a, height()), this->ui.labelText,
QTextOption(Qt::AlignLeft | Qt::AlignVCenter)); QTextOption(Qt::AlignLeft | Qt::AlignVCenter));
} }