merged timeline and viewer nodes together
This commit is contained in:
@@ -198,11 +198,11 @@ void TimeRuler::paintEvent(QPaintEvent *)
|
||||
|
||||
// Calculate line dimensions
|
||||
QFontMetrics fm = p.fontMetrics();
|
||||
int line_bottom = height();
|
||||
int long_height = fm.height();
|
||||
int short_height = long_height/2;
|
||||
int long_y = height() - long_height;
|
||||
int short_y = height() - short_height;
|
||||
int line_bottom = height();
|
||||
int long_y = line_bottom - long_height;
|
||||
int short_y = line_bottom - short_height;
|
||||
|
||||
// Draw long lines
|
||||
int last_long_unit = -1;
|
||||
@@ -272,7 +272,7 @@ void TimeRuler::paintEvent(QPaintEvent *)
|
||||
if (playhead_pos + playhead_width_ >= 0 && playhead_pos - playhead_width_ < width()) {
|
||||
p.setPen(Qt::NoPen);
|
||||
p.setBrush(style_.PlayheadColor());
|
||||
DrawPlayhead(&p, playhead_pos, height());
|
||||
DrawPlayhead(&p, playhead_pos, line_bottom);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -307,6 +307,11 @@ void TimeRuler::DrawPlayhead(QPainter *p, int x, int y)
|
||||
p->drawPolygon(points, 6);
|
||||
}
|
||||
|
||||
int TimeRuler::CacheStatusHeight() const
|
||||
{
|
||||
return fontMetrics().height() / 4;
|
||||
}
|
||||
|
||||
double TimeRuler::ScreenToUnitFloat(int screen)
|
||||
{
|
||||
return (screen + scroll_) / scale_ / timebase_dbl_;
|
||||
|
||||
@@ -64,17 +64,10 @@ signals:
|
||||
void TimeChanged(int64_t);
|
||||
|
||||
private:
|
||||
enum Component {
|
||||
kNone,
|
||||
kDay,
|
||||
kHour,
|
||||
kMinute,
|
||||
kSecond,
|
||||
kFrame
|
||||
};
|
||||
|
||||
void DrawPlayhead(QPainter* p, int x, int y);
|
||||
|
||||
int CacheStatusHeight() const;
|
||||
|
||||
double ScreenToUnitFloat(int screen);
|
||||
|
||||
int64_t ScreenToUnit(int screen);
|
||||
|
||||
Reference in New Issue
Block a user