started timeruler object

This commit is contained in:
itsmattkc
2019-07-24 01:53:24 -07:00
parent 2e41f6d8f0
commit 501110c328
10 changed files with 186 additions and 15 deletions
@@ -22,6 +22,8 @@
#include <QPainter>
#include "common/qtversionabstraction.h"
ProjectExplorerIconViewItemDelegate::ProjectExplorerIconViewItemDelegate(QObject *parent) :
QStyledItemDelegate (parent)
{
@@ -62,11 +64,7 @@ void ProjectExplorerIconViewItemDelegate::paint(QPainter *painter, const QStyleO
QString duration_str = index.data(Qt::UserRole).toString();
#if QT_VERSION < QT_VERSION_CHECK(5, 11, 0)
int timecode_width = fm.width(duration_str);
#else
int timecode_width = fm.horizontalAdvance(duration_str);
#endif
int timecode_width = QFontMetricsWidth(&fm, duration_str);
int max_name_width = option.rect.width();