Fixed some labels being too big on hi-dpi

This commit is contained in:
fourtf
2018-06-24 17:01:45 +02:00
parent 683017008a
commit 68ddd1e7c9
6 changed files with 13 additions and 37 deletions
+3
View File
@@ -213,6 +213,9 @@ void NotebookTab::paintEvent(QPaintEvent *)
QPainter painter(this);
float scale = this->getScale();
qDebug() << painter.device()->devicePixelRatioF() << painter.device()->devicePixelRatioFScale()
<< painter.device()->logicalDpiX();
painter.setFont(getApp()->fonts->getFont(FontStyle::UiTabs, scale * this->devicePixelRatioF()));
QFontMetrics metrics =
app->fonts->getFontMetrics(FontStyle::UiTabs, scale * this->devicePixelRatioF());