fixes tab and split header title text size

This commit is contained in:
fourtf
2019-10-06 21:31:12 +02:00
parent 4ab8a7e9dd
commit 9f52564b9c
3 changed files with 27 additions and 11 deletions
+11 -3
View File
@@ -83,12 +83,20 @@ QSize Label::minimumSizeHint() const
void Label::paintEvent(QPaintEvent *)
{
QPainter painter(this);
qreal deviceDpi =
#ifdef Q_OS_WIN
this->devicePixelRatioF();
#else
1.0;
#endif
QFontMetrics metrics = getFonts()->getFontMetrics(
this->getFontStyle(),
this->scale() * 96.f / this->logicalDpiX() * this->devicePixelRatioF());
this->scale() * 96.f / this->logicalDpiX() * deviceDpi);
painter.setFont(getFonts()->getFont(
this->getFontStyle(), this->scale() * 96.f / this->logicalDpiX() *
this->devicePixelRatioF()));
this->getFontStyle(),
this->scale() * 96.f / this->logicalDpiX() * deviceDpi));
int offset = this->getOffset();