mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fixed label ui scale
This commit is contained in:
parent
22167f33f2
commit
59ee091722
2 changed files with 10 additions and 10 deletions
|
@ -213,12 +213,10 @@ void NotebookTab::paintEvent(QPaintEvent *)
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
float scale = this->getScale();
|
float scale = this->getScale();
|
||||||
|
|
||||||
qDebug() << painter.device()->devicePixelRatioF() << painter.device()->devicePixelRatioFScale()
|
painter.setFont(getApp()->fonts->getFont(
|
||||||
<< painter.device()->logicalDpiX();
|
FontStyle::UiTabs, scale * 96.f / this->logicalDpiX() * this->devicePixelRatioF()));
|
||||||
|
QFontMetrics metrics = app->fonts->getFontMetrics(
|
||||||
painter.setFont(getApp()->fonts->getFont(FontStyle::UiTabs, scale * this->devicePixelRatioF()));
|
FontStyle::UiTabs, scale * 96.f / this->logicalDpiX() * this->devicePixelRatioF());
|
||||||
QFontMetrics metrics =
|
|
||||||
app->fonts->getFontMetrics(FontStyle::UiTabs, scale * this->devicePixelRatioF());
|
|
||||||
|
|
||||||
int height = int(scale * NOTEBOOK_TAB_HEIGHT);
|
int height = int(scale * NOTEBOOK_TAB_HEIGHT);
|
||||||
// int fullHeight = (int)(scale * 48);
|
// int fullHeight = (int)(scale * 48);
|
||||||
|
|
|
@ -89,10 +89,12 @@ void Label::paintEvent(QPaintEvent *)
|
||||||
auto app = getApp();
|
auto app = getApp();
|
||||||
|
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
QFontMetrics metrics = app->fonts->getFontMetrics(this->getFontStyle(),
|
QFontMetrics metrics = app->fonts->getFontMetrics(
|
||||||
this->getScale() * this->devicePixelRatioF());
|
this->getFontStyle(),
|
||||||
painter.setFont(
|
this->getScale() * 96.f / this->logicalDpiX() * this->devicePixelRatioF());
|
||||||
app->fonts->getFont(this->getFontStyle(), this->getScale() * this->devicePixelRatioF()));
|
painter.setFont(app->fonts->getFont(
|
||||||
|
this->getFontStyle(),
|
||||||
|
this->getScale() * 96.f / this->logicalDpiX() * this->devicePixelRatioF()));
|
||||||
|
|
||||||
int offset = this->getOffset();
|
int offset = this->getOffset();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue