better hidpi support

This commit is contained in:
itsmattkc
2018-08-04 12:06:37 +10:00
parent 8e957ade58
commit e19fb30d0d
5 changed files with 11 additions and 5 deletions
+4 -1
View File
@@ -20,6 +20,8 @@
#include <QTime>
#include <QScrollBar>
#include <QtMath>
#include <QGuiApplication>
#include <QScreen>
long refactor_frame_number(long framenumber, double source_frame_rate, double target_frame_rate) {
if (source_frame_rate == target_frame_rate) return framenumber;
@@ -47,7 +49,8 @@ Timeline::Timeline(QWidget *parent) :
importing(false),
ui(new Ui::Timeline),
last_frame(0)
{
{
default_track_height = (QGuiApplication::primaryScreen()->logicalDotsPerInch() / 96) * default_track_height;
ui->setupUi(this);