diff --git a/CHANGELOG.md b/CHANGELOG.md index a5940dba..29918b7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - Bugfix: Fixed live notifications for usernames containing uppercase characters. (#3646) - Bugfix: Fixed certain settings dialogs appearing behind the main window, when `Always on top` was used. (#3679) - Bugfix: Fixed an issue in the emote picker where an emotes tooltip would not properly disappear. (#3686) +- Bugfix: Fixed incorrect spacing of settings icons at high DPI. (#3698) - Dev: Use Game Name returned by Get Streams instead of querying it from the Get Games API. (#3662) ## 2.3.5 diff --git a/src/widgets/helper/SettingsDialogTab.cpp b/src/widgets/helper/SettingsDialogTab.cpp index a3b7bf81..2b54a256 100644 --- a/src/widgets/helper/SettingsDialogTab.cpp +++ b/src/widgets/helper/SettingsDialogTab.cpp @@ -57,15 +57,17 @@ void SettingsDialogTab::paintEvent(QPaintEvent *) this->style()->drawPrimitive(QStyle::PE_Widget, &opt, &painter, this); - int a = (this->height() - (20 * this->scale())) / 2; + int iconSize = 20 * this->scale(); + int pad = (this->height() - iconSize) / 2; QPixmap pixmap = this->ui_.icon.pixmap( - QSize(this->height() - a * 2, this->height() - a * 2)); + QSize(this->height() - pad * 2, this->height() - pad * 2)); - painter.drawPixmap(a, a, pixmap); + painter.drawPixmap(pad, pad, pixmap); - a = a + a + 20 + a; + pad = (3 * pad) + iconSize; - this->style()->drawItemText(&painter, QRect(a, 0, width() - a, height()), + this->style()->drawItemText(&painter, + QRect(pad, 0, width() - pad, height()), Qt::AlignLeft | Qt::AlignVCenter, this->palette(), false, this->ui_.labelText); }