Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Kdenlive
Commits
7e6f5320
Commit
7e6f5320
authored
Feb 11, 2020
by
Sashmita Raghav
Committed by
Jean-Baptiste Mardelle
Feb 11, 2020
Browse files
Add color to slideshow clips in the timeline
parent
92397637
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/Clip.qml
View file @
7e6f5320
...
...
@@ -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
]
==
'
#
'
)
{
...
...
src/timeline2/view/qml/timeline.qml
View file @
7e6f5320
...
...
@@ -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
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
7e6f5320
...
...
@@ -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
());
...
...
src/timeline2/view/timelinecontroller.h
View file @
7e6f5320
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment