switched to global audio rate, support for QT_SCALE_FACTOR
This commit is contained in:
+12
-1
@@ -16,6 +16,7 @@
|
||||
#include "ui_timeline.h"
|
||||
#include "mainwindow.h"
|
||||
#include "ui/viewerwidget.h"
|
||||
#include "dialogs/stabilizerdialog.h"
|
||||
#include "project/media.h"
|
||||
#include "debug.h"
|
||||
|
||||
@@ -150,6 +151,11 @@ void TimelineWidget::show_context_menu(const QPoint& pos) {
|
||||
QAction* nestAction = menu.addAction("&Nest");
|
||||
connect(nestAction, SIGNAL(triggered(bool)), mainWindow, SLOT(on_actionNest_triggered()));
|
||||
|
||||
if (selected_clips.size() == 1 && selected_clips.at(0)->media != NULL && selected_clips.at(0)->media->get_type() == MEDIA_TYPE_FOOTAGE) {
|
||||
QAction* stabilizerAction = menu.addAction("S&tabilizer");
|
||||
connect(stabilizerAction, SIGNAL(triggered(bool)), this, SLOT(show_stabilizer_diag()));
|
||||
}
|
||||
|
||||
// set autoscale arbitrarily to the first selected clip
|
||||
autoscaleAction->setChecked(selected_clips.at(0)->autoscale);
|
||||
|
||||
@@ -229,7 +235,12 @@ void TimelineWidget::rename_clip() {
|
||||
undo_stack.push(rcc);
|
||||
update_ui(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TimelineWidget::show_stabilizer_diag() {
|
||||
StabilizerDialog sd;
|
||||
sd.exec();
|
||||
}
|
||||
|
||||
bool same_sign(int a, int b) {
|
||||
|
||||
@@ -85,6 +85,7 @@ private slots:
|
||||
void toggle_autoscale();
|
||||
void tooltip_timer_timeout();
|
||||
void rename_clip();
|
||||
void show_stabilizer_diag();
|
||||
};
|
||||
|
||||
#endif // TIMELINEWIDGET_H
|
||||
|
||||
+12
-1
@@ -32,6 +32,7 @@
|
||||
#include <QOffscreenSurface>
|
||||
#include <QFileDialog>
|
||||
#include <QPolygon>
|
||||
#include <QDesktopWidget>
|
||||
|
||||
extern "C" {
|
||||
#include <libavformat/avformat.h>
|
||||
@@ -618,7 +619,17 @@ GLuint ViewerWidget::compose_sequence(QVector<Clip*>& nests, bool render_audio)
|
||||
} else if (rendering) {
|
||||
glViewport(0, 0, s->width, s->height);
|
||||
} else {
|
||||
glViewport(0, 0, width(), height());
|
||||
int widget_width = width();
|
||||
int widget_height = height();
|
||||
|
||||
QString qt_scale_factor = QString(qgetenv("QT_SCALE_FACTOR"));
|
||||
if (!qt_scale_factor.isEmpty()) {
|
||||
double scale = qt_scale_factor.toDouble();
|
||||
widget_width *= scale;
|
||||
widget_height *= scale;
|
||||
}
|
||||
|
||||
glViewport(0, 0, widget_width, widget_height);
|
||||
}
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, composite_texture);
|
||||
|
||||
Reference in New Issue
Block a user