New setting menu icons! (#189)

* LUL

* Added system icon for OSX
This commit is contained in:
coral
2018-01-01 18:44:52 -08:00
committed by fourtf
parent eb4ba30d9f
commit 0e8b50c4e9
12 changed files with 116 additions and 12 deletions
+6 -4
View File
@@ -12,7 +12,7 @@ SettingsDialogTab::SettingsDialogTab(SettingsDialog *_dialog, QString _labelText
: dialog(_dialog)
{
this->ui.labelText = _labelText;
this->ui.image.load(imageFileName);
this->ui.icon.addFile(imageFileName);
this->setCursor(QCursor(Qt::PointingHandCursor));
@@ -50,11 +50,13 @@ void SettingsDialogTab::paintEvent(QPaintEvent *)
this->style()->drawPrimitive(QStyle::PE_Widget, &opt, &painter, this);
int a = (this->height() - this->ui.image.width()) / 2;
int a = (this->height() - 20) / 2;
QPixmap pixmap = this->ui.icon.pixmap(QSize(20,20));
painter.drawImage(a, a, this->ui.image);
a = a + a + this->ui.image.width();
painter.drawPixmap(0, a, pixmap);
a = a + a + 20;
painter.drawText(QRect(a, 0, width() - a, height()), this->ui.labelText,
QTextOption(Qt::AlignLeft | Qt::AlignVCenter));