diff --git a/io/path.cpp b/io/path.cpp index fe2e9fc80..533acc110 100644 --- a/io/path.cpp +++ b/io/path.cpp @@ -3,6 +3,7 @@ #include #include #include +#include "debug.h" QString real_app_dir; diff --git a/mainwindow.cpp b/mainwindow.cpp index 11c5e4376..e9e27718a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -81,6 +81,7 @@ MainWindow::MainWindow(QWidget *parent) : // set up style? qApp->setStyle(QStyleFactory::create("Fusion")); + setStyleSheet("QPushButton::checked { background: rgb(25, 25, 25); }"); QPalette darkPalette; darkPalette.setColor(QPalette::Window, QColor(53,53,53)); @@ -95,7 +96,7 @@ MainWindow::MainWindow(QWidget *parent) : darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, QColor(128, 128, 128)); darkPalette.setColor(QPalette::Link, QColor(42, 130, 218)); darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218)); - darkPalette.setColor(QPalette::HighlightedText, Qt::black); + darkPalette.setColor(QPalette::HighlightedText, Qt::black); qApp->setPalette(darkPalette); diff --git a/panels/timeline.cpp b/panels/timeline.cpp index ec14a82d6..a39a9054c 100644 --- a/panels/timeline.cpp +++ b/panels/timeline.cpp @@ -1405,6 +1405,9 @@ void Timeline::on_toolTransitionButton_clicked() { } connect(&transition_menu, SIGNAL(triggered(QAction*)), this, SLOT(transition_menu_select(QAction*))); + + ui->toolTransitionButton->setChecked(false); + transition_menu.exec(QCursor::pos()); } @@ -1420,4 +1423,5 @@ void Timeline::transition_menu_select(QAction* a) { decheck_tool_buttons(sender()); ui->timeline_area->setCursor(Qt::CrossCursor); tool = TIMELINE_TOOL_TRANSITION; + ui->toolTransitionButton->setChecked(true); } diff --git a/panels/viewer.cpp b/panels/viewer.cpp index 3e77fb2b1..1a24a0acc 100644 --- a/panels/viewer.cpp +++ b/panels/viewer.cpp @@ -492,12 +492,23 @@ void Viewer::on_pushButton_3_clicked() { } void Viewer::update_playhead() { - seek(ui->currentTimecode->value()); + seek(ui->currentTimecode->value()); } void Viewer::timer_update() { - seq->playhead = round(playhead_start + ((QDateTime::currentMSecsSinceEpoch()-start_msecs) * 0.001 * seq->frame_rate)); + long previous_playhead = seq->playhead; + + seq->playhead = qRound(playhead_start + ((QDateTime::currentMSecsSinceEpoch()-start_msecs) * 0.001 * seq->frame_rate)); update_parents(); + + long end_frame = (seq->using_workarea && previous_playhead < seq->workarea_out) ? seq->workarea_out : seq->getEndFrame(); + if ((!recording + && playing + && seq->playhead >= end_frame + && previous_playhead < end_frame) + || (recording && recording_start != recording_end && seq->playhead >= recording_end)) { + pause(); + } } void Viewer::recording_flasher_update() { diff --git a/project/effect.cpp b/project/effect.cpp index 8199e16e8..0c7c55d5b 100644 --- a/project/effect.cpp +++ b/project/effect.cpp @@ -162,9 +162,9 @@ void load_internal_effects() { void load_shader_effects() { QString effects_path = get_effects_dir(); - QDir effects_dir(effects_path); - if (effects_dir.exists()) { - QList entries = effects_dir.entryList(QStringList("*.xml"), QDir::Files); + QDir effects_dir(effects_path); + if (effects_dir.exists()) { + QList entries = effects_dir.entryList(QStringList("*.xml"), QDir::Files); for (int i=0;iclips.at(index); + close_clip(ref); + if (ref->multithreaded) ref->cacher->wait(); seq->clips[index] = NULL; // delete link to this clip diff --git a/ui/timelinewidget.cpp b/ui/timelinewidget.cpp index 0e23d0022..845013b58 100644 --- a/ui/timelinewidget.cpp +++ b/ui/timelinewidget.cpp @@ -2026,35 +2026,38 @@ void TimelineWidget::paintEvent(QPaintEvent*) { draw_checkerboard = true; } else if (ms->preview_done) { // draw top and tail triangles - int triangle_size = TRACK_MIN_HEIGHT >> 2; - p.setPen(Qt::NoPen); - p.setBrush(QColor(80, 80, 80)); - if (clip->clip_in == 0 - && clip_rect.x() + triangle_size > 0 - && clip_rect.y() + triangle_size > 0 - && clip_rect.x() < width() - && clip_rect.y() < height()) { - const QPoint points[3] = { - QPoint(clip_rect.x(), clip_rect.y()), - QPoint(clip_rect.x() + triangle_size, clip_rect.y()), - QPoint(clip_rect.x(), clip_rect.y() + triangle_size) - }; - p.drawPolygon(points, 3); - text_rect.setLeft(text_rect.left() + (triangle_size >> 2)); - } - if (clip->timeline_out - clip->timeline_in + clip->clip_in == clip->getMaximumLength() - && clip_rect.right() - triangle_size < width() - && clip_rect.y() + triangle_size > 0 - && clip_rect.right() > 0 - && clip_rect.y() < height()) { - const QPoint points[3] = { - QPoint(clip_rect.right(), clip_rect.y()), - QPoint(clip_rect.right() - triangle_size, clip_rect.y()), - QPoint(clip_rect.right(), clip_rect.y() + triangle_size) - }; - p.drawPolygon(points, 3); - text_rect.setRight(text_rect.right() - (triangle_size >> 2)); - } + int triangle_size = TRACK_MIN_HEIGHT >> 2; + if (!ms->infinite_length && clip_rect.width() > triangle_size) { + p.setPen(Qt::NoPen); + p.setBrush(QColor(80, 80, 80)); + if (clip->clip_in == 0 + && clip_rect.x() + triangle_size > 0 + && clip_rect.y() + triangle_size > 0 + && clip_rect.x() < width() + && clip_rect.y() < height()) { + const QPoint points[3] = { + QPoint(clip_rect.x(), clip_rect.y()), + QPoint(clip_rect.x() + triangle_size, clip_rect.y()), + QPoint(clip_rect.x(), clip_rect.y() + triangle_size) + }; + p.drawPolygon(points, 3); + text_rect.setLeft(text_rect.left() + (triangle_size >> 2)); + } + if (clip->timeline_out - clip->timeline_in + clip->clip_in == clip->getMaximumLength() + && clip_rect.right() - triangle_size < width() + && clip_rect.y() + triangle_size > 0 + && clip_rect.right() > 0 + && clip_rect.y() < height()) { + const QPoint points[3] = { + QPoint(clip_rect.right(), clip_rect.y()), + QPoint(clip_rect.right() - triangle_size, clip_rect.y()), + QPoint(clip_rect.right(), clip_rect.y() + triangle_size) + }; + p.drawPolygon(points, 3); + text_rect.setRight(text_rect.right() - (triangle_size >> 2)); + } + } + p.setBrush(Qt::NoBrush); // draw thumbnail/waveform diff --git a/ui/viewerwidget.cpp b/ui/viewerwidget.cpp index 12e99d374..e3af97d0e 100644 --- a/ui/viewerwidget.cpp +++ b/ui/viewerwidget.cpp @@ -656,14 +656,5 @@ void ViewerWidget::paintGL() { glDisable(GL_BLEND); glDisable(GL_TEXTURE_2D); - } while (loop); - - // TODO this could be cleaned up but it's not a priority rn - if (!recording - && viewer->playing - && (viewer->seq->playhead == viewer->seq->getEndFrame() || (viewer->seq->using_workarea && viewer->seq->playhead >= viewer->seq->workarea_out))) { - viewer->pause(); - } else if (recording && viewer->recording_start != viewer->recording_end && viewer->seq->playhead >= viewer->recording_end) { - viewer->pause(); - } + } while (loop); }