better hidpi support
This commit is contained in:
@@ -45,7 +45,7 @@ void PreviewGenerator::parse_media() {
|
||||
} else {
|
||||
ms->infinite_length = false;
|
||||
ms->video_frame_rate = av_q2d(fmt_ctx->streams[i]->avg_frame_rate);
|
||||
}
|
||||
}
|
||||
ms->video_width = fmt_ctx->streams[i]->codecpar->width;
|
||||
ms->video_height = fmt_ctx->streams[i]->codecpar->height;
|
||||
if (append) media->video_tracks.append(ms);
|
||||
|
||||
+2
-2
@@ -380,8 +380,8 @@ void Project::process_file_list(QStringList& files) {
|
||||
}
|
||||
}
|
||||
|
||||
if (!skip) {
|
||||
ta->add_media(import_file(file, files.at(i)));
|
||||
if (!skip) {
|
||||
ta->add_media(import_file(file, files.at(i)));
|
||||
imported = true;
|
||||
project_changed = true;
|
||||
}
|
||||
|
||||
+4
-1
@@ -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);
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
#include <QTime>
|
||||
#include <QTimer>
|
||||
|
||||
#define TRACK_DEFAULT_HEIGHT 40
|
||||
|
||||
class QPushButton;
|
||||
class SourceTable;
|
||||
class ViewerWidget;
|
||||
@@ -204,6 +206,8 @@ private:
|
||||
long last_frame;
|
||||
QVector<Clip*> clip_clipboard;
|
||||
void reset_all_audio();
|
||||
|
||||
int default_track_height;
|
||||
};
|
||||
|
||||
#endif // TIMELINE_H
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#define CLIP_TEXT_PADDING 3
|
||||
|
||||
#define TRACK_MIN_HEIGHT 30
|
||||
#define TRACK_DEFAULT_HEIGHT 60
|
||||
#define TRACK_HEIGHT_INCREMENT 10
|
||||
|
||||
struct Sequence;
|
||||
|
||||
Reference in New Issue
Block a user