Fix razor cursor sometimes not appearing and not adapting to color theme

CCBUG: 357520
parent 2884e7ae
......@@ -39,6 +39,7 @@
#include "mainwindow.h"
#include "transitionhandler.h"
#include "project/clipmanager.h"
#include "utils/KoIconUtils.h"
#include "effectslist/initeffects.h"
#include "dialogs/profilesdialog.h"
#include "ui_keyframedialog_ui.h"
......@@ -158,7 +159,7 @@ CustomTrackView::CustomTrackView(KdenliveDoc *doc, Timeline *timeline, CustomTra
m_thumbsTimer.setInterval(500);
m_thumbsTimer.setSingleShot(true);
QIcon razorIcon = QIcon::fromTheme("edit-cut");
QIcon razorIcon = KoIconUtils::themedIcon(QStringLiteral("edit-cut"));
m_razorCursor = QCursor(razorIcon.pixmap(32, 32));
m_spacerCursor = QCursor(Qt::SplitHCursor);
connect(m_document->renderer(), SIGNAL(prepareTimelineReplacement(QString)), this, SLOT(slotPrepareTimelineReplacement(QString)), Qt::DirectConnection);
......@@ -7413,6 +7414,8 @@ void CustomTrackView::updatePalette()
pen1.setColor(line);
m_cursorLine->setPen(pen1);
}
QIcon razorIcon = KoIconUtils::themedIcon(QStringLiteral("edit-cut"));
m_razorCursor = QCursor(razorIcon.pixmap(32, 32));
}
void CustomTrackView::removeTipAnimation()
......
......@@ -812,7 +812,8 @@ void Timeline::updatePalette()
p.setColor(QPalette::Button, norm);
QColor col = scheme.background().color();
QColor col2 = scheme.foreground().color();
headers_container->setStyleSheet(QString("QLineEdit { background-color: transparent;color: %1;} QLineEdit:hover{ background-color: %2;} QLineEdit:focus { background-color: %2;}").arg(col2.name()).arg(col.name()));
headers_container->setStyleSheet(QStringLiteral("QLineEdit { background-color: transparent;color: %1;} QLineEdit:hover{ background-color: %2;} QLineEdit:focus { background-color: %2;}").arg(col2.name()).arg(col.name()));
m_trackview->updatePalette();
}
void Timeline::refreshIcons()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment