mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fix incorrect spacing of settings icons at high DPI (#3698)
Co-authored-by: pajlada <rasmus.karlsson@pajlada.com>
This commit is contained in:
parent
94e4cd2c1d
commit
b825493d6e
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue