From 945df5684e8241cdada0ef316141eaa67492b2ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Sat, 3 Aug 2024 00:40:16 +0200 Subject: [PATCH] Update timelinewidget.cpp HiDPI fix. --- src/app/GUI/timelinewidget.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/GUI/timelinewidget.cpp b/src/app/GUI/timelinewidget.cpp index a4c85b5e2..2e63d6ca1 100644 --- a/src/app/GUI/timelinewidget.cpp +++ b/src/app/GUI/timelinewidget.cpp @@ -25,6 +25,7 @@ #include #include +#include #include "timelinewidget.h" #include "widgets/framescrollbar.h" @@ -249,7 +250,10 @@ TimelineWidget::TimelineWidget(Document &document, mFrameScrollBar = new FrameScrollBar(1, 1, false, false, false, this); mFrameScrollBar->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Preferred); - mFrameScrollBar->setFixedHeight(40); + + const qreal dpi = QApplication::desktop()->logicalDpiX() / 96.0; + mFrameScrollBar->setFixedHeight(40 * dpi); + // connect(MemoryHandler::sGetInstance(), &MemoryHandler::memoryFreed, // frameScrollBar, // qOverload<>(&FrameScrollBar::update));