From 134677d77a5533c84a414dd41b6ba470ac098f5a Mon Sep 17 00:00:00 2001 From: alexmitchell Date: Sun, 3 Feb 2019 03:53:33 +1030 Subject: [PATCH] Simple fix for timecode text dropping too low within background rectangle. Unsure as to why this issue didn't happen at first commit. --- effects/internal/timecodeeffect.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/effects/internal/timecodeeffect.cpp b/effects/internal/timecodeeffect.cpp index 7e8299b76..52a1d65c7 100644 --- a/effects/internal/timecodeeffect.cpp +++ b/effects/internal/timecodeeffect.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include "ui/labelslider.h" #include "ui/collapsiblewidget.h" @@ -93,13 +94,13 @@ void TimecodeEffect::redraw(double timecode) { text_x = offset_x + (width/2) - (text_width/2); text_y = offset_y + height - height/10; - rect_y = text_y + fm.descent()/2 - text_height; + rect_y = text_y + fm.descent() - text_height; path.addText(text_x, text_y, font, display_timecode); p.setPen(Qt::NoPen); p.setBrush(background_color); - p.drawRect(QRect(text_x-fm.descent()/2, rect_y, text_width+fm.descent(), text_height)); + p.drawRect(QRect(text_x-fm.descent(), rect_y, text_width+fm.descent()*2, text_height)); p.setBrush(color_val->get_color_value(timecode)); p.drawPath(path); }