made formal QtUtils class
This commit is contained in:
@@ -48,7 +48,7 @@ TimeRuler::TimeRuler(bool text_visible, bool cache_status_visible, QWidget* pare
|
||||
|
||||
// Get the "minimum" space allowed between two line markers on the ruler (in screen pixels)
|
||||
// Mediocre but reliable way of scaling UI objects by font/DPI size
|
||||
minimum_gap_between_lines_ = QFontMetricsWidth(fm, "H");
|
||||
minimum_gap_between_lines_ = QtUtils::QFontMetricsWidth(fm, "H");
|
||||
|
||||
// Text visibility affects height, so we set that here
|
||||
UpdateHeight();
|
||||
@@ -209,7 +209,7 @@ void TimeRuler::paintEvent(QPaintEvent *)
|
||||
QRect text_rect;
|
||||
Qt::Alignment text_align;
|
||||
QString timecode_str = Timecode::timestamp_to_timecode(ScreenToUnit(i), timebase(), Core::instance()->GetTimecodeDisplay());
|
||||
int timecode_width = QFontMetricsWidth(fm, timecode_str);
|
||||
int timecode_width = QtUtils::QFontMetricsWidth(fm, timecode_str);
|
||||
int timecode_left;
|
||||
|
||||
if (centered_text_) {
|
||||
|
||||
Reference in New Issue
Block a user