From 1cfc5a6fa17100b9f1c9198860ac86d8d42868df Mon Sep 17 00:00:00 2001 From: mass Date: Fri, 16 Nov 2018 18:27:49 +1030 Subject: [PATCH] don't show thumbnail if only a 1/4 is showing --- ui/timelinewidget.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/timelinewidget.cpp b/ui/timelinewidget.cpp index 38496e8fb..934ae7390 100644 --- a/ui/timelinewidget.cpp +++ b/ui/timelinewidget.cpp @@ -2085,7 +2085,8 @@ void TimelineWidget::paintEvent(QPaintEvent*) { int thumb_width = (thumb_height*((double)ms->video_preview.width()/(double)ms->video_preview.height())); if (thumb_x + thumb_width >= 0 && thumb_height > thumb_y - && thumb_y + thumb_height >= 0){ + && thumb_y + thumb_height >= 0 + && space_for_thumb > thumb_width / 4){ //don't show thumbnail if 1/4 is only showing if (space_for_thumb < thumb_width){ p.setClipping(true); p.setClipRegion(QRegion(thumb_x, clip_rect.y()+thumb_y, clip_rect.width()-1, thumb_height));