Commit 7e6f5320 authored by Sashmita Raghav's avatar Sashmita Raghav Committed by Jean-Baptiste Mardelle

Add color to slideshow clips in the timeline

parent 92397637
......@@ -191,6 +191,9 @@ Rectangle {
if (itemType == ProducerType.Image) {
return imageColor
}
if (itemType == ProducerType.SlideShow) {
return slideshowColor
}
if (itemType == ProducerType.Color) {
var color = clipResource.substring(clipResource.length - 9)
if (color[0] == '#') {
......
......@@ -236,6 +236,7 @@ Rectangle {
property color audioColor: timeline.audioColor
property color videoColor: timeline.videoColor
property color imageColor: timeline.imageColor
property color slideshowColor: timeline.slideshowColor
property color lockedColor: timeline.lockedColor
property color selectionColor: timeline.selectionColor
property color groupColor: timeline.groupColor
......
......@@ -2675,6 +2675,15 @@ QColor TimelineController::imageColor() const
return scheme.foreground(KColorScheme::NeutralText).color();
}
QColor TimelineController::slideshowColor() const
{
KColorScheme scheme(QApplication::palette().currentColorGroup());
QColor base = scheme.foreground(KColorScheme::LinkText).color();
QColor high = scheme.foreground(KColorScheme::NeutralText).color();
QColor slide = QColor(qBound(0, base.red() + (int)(high.red() - 128), 255), qBound(0, base.green() + (int)(high.green() - 128), 255), qBound(0, base.blue() + (int)(high.blue() - 128), 255), 255);
return slide;
}
QColor TimelineController::lockedColor() const
{
KColorScheme scheme(QApplication::palette().currentColorGroup());
......
......@@ -73,6 +73,7 @@ class TimelineController : public QObject
Q_PROPERTY(QColor videoColor READ videoColor NOTIFY colorsChanged)
Q_PROPERTY(QColor audioColor READ audioColor NOTIFY colorsChanged)
Q_PROPERTY(QColor imageColor READ imageColor NOTIFY colorsChanged)
Q_PROPERTY(QColor slideshowColor READ slideshowColor NOTIFY colorsChanged)
Q_PROPERTY(QColor targetColor READ targetColor NOTIFY colorsChanged)
Q_PROPERTY(QColor targetTextColor READ targetTextColor NOTIFY colorsChanged)
Q_PROPERTY(QColor lockedColor READ lockedColor NOTIFY colorsChanged)
......@@ -157,6 +158,7 @@ public:
Q_INVOKABLE QColor videoColor() const;
Q_INVOKABLE QColor audioColor() const;
Q_INVOKABLE QColor imageColor() const;
Q_INVOKABLE QColor slideshowColor() const;
Q_INVOKABLE QColor targetColor() const;
Q_INVOKABLE QColor targetTextColor() const;
Q_INVOKABLE QColor lockedColor() const;
......
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