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
2754efad
Commit
2754efad
authored
Aug 20, 2022
by
Julius Künzel
💬
Browse files
Use QColorUtils instead of custom function, fix qml warnings
parent
448dc5b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/dialogs/clipcreationdialog.cpp
View file @
2754efad
...
...
@@ -22,6 +22,7 @@ SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
#include
"ui_colorclip_ui.h"
#include
"ui_qtextclip_ui.h"
#include
"utils/devices.hpp"
#include
"utils/qcolorutils.h"
#include
"widgets/timecodedisplay.h"
#include
"xml/xml.hpp"
...
...
@@ -261,16 +262,13 @@ void ClipCreationDialog::createQTextClip(KdenliveDoc *doc, const QString &parent
dia_ui
.
fgColor
->
setAlphaChannelEnabled
(
true
);
dia_ui
.
lineColor
->
setAlphaChannelEnabled
(
true
);
dia_ui
.
bgColor
->
setAlphaChannelEnabled
(
true
);
auto
get_color
=
[](
ProjectClip
*
clip
,
const
QString
&
name
)
{
return
QColor
(
clip
->
getProducerProperty
(
name
).
replace
(
QStringLiteral
(
"0x"
),
QStringLiteral
(
"#"
)));
};
if
(
clip
)
{
dia_ui
.
name
->
setText
(
clip
->
clipName
());
dia_ui
.
text
->
setPlainText
(
clip
->
getProducerProperty
(
QStringLiteral
(
"text"
)));
dia_ui
.
fgColor
->
setColor
(
get_color
(
clip
,
QStringLiteral
(
"fgcolour"
)));
dia_ui
.
bgColor
->
setColor
(
get_color
(
clip
,
QStringLiteral
(
"bgcolour"
)));
dia_ui
.
fgColor
->
setColor
(
QColorUtils
::
stringToColor
(
clip
->
getProducerProperty
(
QStringLiteral
(
"fgcolour"
)))
)
;
dia_ui
.
bgColor
->
setColor
(
QColorUtils
::
stringToColor
(
clip
->
getProducerProperty
(
QStringLiteral
(
"bgcolour"
)))
)
;
dia_ui
.
pad
->
setValue
(
clip
->
getProducerProperty
(
QStringLiteral
(
"pad"
)).
toInt
());
dia_ui
.
lineColor
->
setColor
(
get_color
(
clip
,
QStringLiteral
(
"olcolour"
)));
dia_ui
.
lineColor
->
setColor
(
QColorUtils
::
stringToColor
(
clip
->
getProducerProperty
(
QStringLiteral
(
"olcolour"
)))
)
;
dia_ui
.
lineWidth
->
setValue
(
clip
->
getProducerProperty
(
QStringLiteral
(
"outline"
)).
toInt
());
dia_ui
.
font
->
setCurrentFont
(
QFont
(
clip
->
getProducerProperty
(
QStringLiteral
(
"family"
))));
dia_ui
.
fontSize
->
setValue
(
clip
->
getProducerProperty
(
QStringLiteral
(
"size"
)).
toInt
());
...
...
src/timeline2/view/qml/timeline.qml
View file @
2754efad
...
...
@@ -974,7 +974,7 @@ Rectangle {
height
:
subtitleTrack
.
height
property
bool
collapsed
:
subtitleTrack
.
height
==
root
.
collapsedHeight
visible
:
height
>
0
color
:
controller
.
isSubtitleTrack
(
timeline
.
activeTrack
)
?
Qt
.
tint
(
getTrackColor
(
false
,
false
),
selectedTrackColor
)
:
getTrackColor
(
false
,
false
)
color
:
(
controller
&&
controller
.
isSubtitleTrack
(
timeline
.
activeTrack
)
)
?
Qt
.
tint
(
getTrackColor
(
false
,
false
),
selectedTrackColor
)
:
getTrackColor
(
false
,
false
)
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
...
...
@@ -1640,7 +1640,7 @@ Rectangle {
border.width
:
1
border.color
:
root
.
frameColor
height
:
subtitleTrack
.
height
color
:
controller
.
isSubtitleTrack
(
timeline
.
activeTrack
)
?
Qt
.
tint
(
getTrackColor
(
false
,
false
),
selectedTrackColor
)
:
getTrackColor
(
false
,
false
)
color
:
(
controller
&&
controller
.
isSubtitleTrack
(
timeline
.
activeTrack
)
)
?
Qt
.
tint
(
getTrackColor
(
false
,
false
),
selectedTrackColor
)
:
getTrackColor
(
false
,
false
)
}
Column
{
y
:
subtitleTrack
.
height
...
...
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