updateFrameSize();
m_scale = 3;
m_zoneColor = KStatefulBrush(KColorScheme::View, KColorScheme::FocusColor, KSharedConfig::openConfig(KdenliveSettings::colortheme())).brush(this).color();
+ m_zoneColor.setAlpha(180);
m_zoneStart = 0;
m_zoneEnd = 100;
m_contextMenu = new QMenu(this);
void CustomRuler::updatePalette()
{
m_zoneColor = KStatefulBrush(KColorScheme::View, KColorScheme::FocusColor, KSharedConfig::openConfig(KdenliveSettings::colortheme())).brush(this).color();
+ m_zoneColor.setAlpha(180);
}
void CustomRuler::updateProjectFps(Timecode t)
int pos = (int)((event->x() + m_offset));
if (m_cursorColor == palette().text() && qAbs(pos - m_view->cursorPos() * m_factor) < 7) {
// Mouse is over cursor
- m_cursorColor = palette().highlight();
+ m_cursorColor = palette().link();
update(m_view->cursorPos() * m_factor - m_offset - 10, LABEL_SIZE + 2, 20, MAX_HEIGHT - LABEL_SIZE - 2);
}
- else if (m_cursorColor == palette().highlight() && qAbs(pos - m_view->cursorPos() * m_factor) >= 7) {
+ else if (m_cursorColor == palette().link() && qAbs(pos - m_view->cursorPos() * m_factor) >= 7) {
m_cursorColor = palette().text();
update(m_view->cursorPos() * m_factor - m_offset - 10, LABEL_SIZE + 2, 20, MAX_HEIGHT - LABEL_SIZE - 2);
}
void CustomRuler::leaveEvent(QEvent * event)
{
QWidget::leaveEvent(event);
- if (m_cursorColor == palette().highlight()) {
+ if (m_cursorColor == palette().link()) {
m_cursorColor = palette().text();
update();
}
p.drawPolygon(pa);
if (m_lastSeekPosition != SEEK_INACTIVE && m_lastSeekPosition != m_view->cursorPos()) {
- p.fillRect(m_lastSeekPosition * m_factor - m_offset - 1, BIG_MARK_X + 1, 3, MAX_HEIGHT - BIG_MARK_X - 1, palette().highlight());
+ p.fillRect(m_lastSeekPosition * m_factor - m_offset - 1, BIG_MARK_X + 1, 3, MAX_HEIGHT - BIG_MARK_X - 1, palette().linkVisited());
}
}
void Render::emitFrameNumber()
{
int currentPos = m_mltConsumer->position();
- if (currentPos == requestedSeekPosition) requestedSeekPosition = SEEK_INACTIVE;
+ if (currentPos == requestedSeekPosition) {
+ requestedSeekPosition = SEEK_INACTIVE;
+ m_paused = true;
+ }
emit rendererPosition(currentPos);
if (requestedSeekPosition != SEEK_INACTIVE) {
m_mltConsumer->purge();
m_mltProducer->seek(requestedSeekPosition);
- if (m_mltProducer->get_speed() == 0 && m_paused) {
- m_paused = false;
+ if (m_mltProducer->get_speed() == 0 && !m_paused) {
m_mltConsumer->set("refresh", 1);
}
requestedSeekPosition = SEEK_INACTIVE;
m_zoneStart = 10;
m_zoneEnd = 60;
KSharedConfigPtr config = KSharedConfig::openConfig(KdenliveSettings::colortheme());
- m_zoneBrush = KStatefulBrush(KColorScheme::View, KColorScheme::FocusColor, config);
+ m_zoneColor = KStatefulBrush(KColorScheme::View, KColorScheme::FocusColor, config).brush(this).color();
+ m_zoneColor.setAlpha(180);
setMouseTracking(true);
setMinimumHeight(8);
void SmallRuler::leaveEvent(QEvent * event)
{
QWidget::leaveEvent(event);
- if (m_cursorColor == palette().highlight()) {
+ if (m_cursorColor == palette().link()) {
m_cursorColor = palette().text();
update();
}
else {
if (m_cursorColor == palette().text() && qAbs(pos - m_cursorFramePosition) * m_scale < 7) {
// Mouse is over cursor
- m_cursorColor = palette().highlight();
+ m_cursorColor = palette().link();
update();
}
- else if (m_cursorColor == palette().highlight() && qAbs(pos - m_cursorFramePosition) * m_scale >= 7) {
+ else if (m_cursorColor == palette().link() && qAbs(pos - m_cursorFramePosition) * m_scale >= 7) {
m_cursorColor = palette().text();
update();
}
const int zoneStart = (int)(m_zoneStart * m_scale);
const int zoneEnd = (int)(m_zoneEnd * m_scale);
- p.setPen(Qt::NoPen);
- p.setBrush(m_zoneBrush.brush(this));
- p.drawRect(zoneStart, 0, zoneEnd - zoneStart, height());
+ p.fillRect(zoneStart, 0, zoneEnd - zoneStart, height(), QBrush(m_zoneColor));
// draw ruler
p.setPen(palette().midlight().color());
// Draw seeking pointer
if (m_lastSeekPosition != SEEK_INACTIVE && m_lastSeekPosition != m_cursorFramePosition) {
- p.fillRect(m_lastSeekPosition * m_scale - 1, 0, 3, height(), palette().highlight());
+ p.fillRect(m_lastSeekPosition * m_scale - 1, 0, 3, height(), palette().linkVisited());
}
}
void SmallRuler::updatePalette()
{
KSharedConfigPtr config = KSharedConfig::openConfig(KdenliveSettings::colortheme());
- m_zoneBrush = KStatefulBrush(KColorScheme::View, KColorScheme::FocusColor, config);
+ m_zoneColor = KStatefulBrush(KColorScheme::View, KColorScheme::FocusColor, config).brush(this).color();
+ m_zoneColor.setAlpha(180);
updatePixmap();
}
int m_maxval;
int m_zoneStart;
int m_zoneEnd;
- KStatefulBrush m_zoneBrush;
+ QColor m_zoneColor;
QList <CommentedTime> m_markers;
QPixmap m_pixmap;
Monitor *m_monitor;