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
b3b88adc
Commit
b3b88adc
authored
Mar 19, 2020
by
Jean-Baptiste Mardelle
Browse files
Small fonts adjustments
parent
2f243d35
Changes
10
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
b3b88adc
...
...
@@ -1195,12 +1195,12 @@ void MainWindow::setupActions()
if
(
KdenliveSettings
::
gpu_accel
())
{
/*QString styleBorderless = QStringLiteral("QToolButton { border-width: 0px;margin: 1px 3px 0px;padding: 0px;}");*/
m_trim
Label
=
new
QLabel
(
i18n
(
"Experimental GPU processing enabled - not for production"
),
this
);
m_trim
Label
->
setFont
(
QFontDatabase
::
systemFont
(
QFontDatabase
::
SmallestReadableFont
));
QLabel
*
warn
Label
=
new
QLabel
(
i18n
(
"Experimental GPU processing enabled - not for production"
),
this
);
warn
Label
->
setFont
(
QFontDatabase
::
systemFont
(
QFontDatabase
::
SmallestReadableFont
));
// m_trimLabel->setAutoFillBackground(true);
m_trim
Label
->
setAlignment
(
Qt
::
AlignHCenter
);
m_trim
Label
->
setStyleSheet
(
QStringLiteral
(
"QLabel { background-color :red; color:black;padding-left:2px;padding-right:2px}"
));
toolbar
->
addWidget
(
m_trim
Label
);
warn
Label
->
setAlignment
(
Qt
::
AlignHCenter
);
warn
Label
->
setStyleSheet
(
QStringLiteral
(
"QLabel { background-color :red; color:black;padding-left:2px;padding-right:2px}"
));
toolbar
->
addWidget
(
warn
Label
);
}
toolbar
->
addAction
(
m_buttonAutomaticTransition
);
toolbar
->
addAction
(
m_buttonVideoThumbs
);
...
...
src/monitor/qmlmanager.cpp
View file @
b3b88adc
...
...
@@ -54,8 +54,7 @@ void QmlManager::setScene(Kdenlive::MonitorId id, MonitorSceneType type, QSize p
}
m_sceneType
=
type
;
QQuickItem
*
root
=
nullptr
;
const
QFont
ft
=
QFontDatabase
::
systemFont
(
QFontDatabase
::
FixedFont
);
m_view
->
rootContext
()
->
setContextProperty
(
"fixedFont"
,
ft
);
m_view
->
rootContext
()
->
setContextProperty
(
"fixedFont"
,
QFontDatabase
::
systemFont
(
QFontDatabase
::
FixedFont
));
double
scalex
=
(
double
)
displayRect
.
width
()
/
profile
.
width
()
*
zoom
;
double
scaley
=
(
double
)
displayRect
.
height
()
/
profile
.
height
()
*
zoom
;
switch
(
type
)
{
...
...
src/monitor/view/kdenlivemonitorrotoscene.qml
View file @
b3b88adc
...
...
@@ -313,7 +313,7 @@ Item {
Text
{
id
:
label
text
:
i18n
(
"
Click to add points,
\n
right click to close shape.
"
)
font
.pointSize
:
root
.
baseUni
t
font
:
miniFon
t
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
anchors
{
...
...
src/timeline2/view/qml/Clip.qml
View file @
b3b88adc
...
...
@@ -120,7 +120,7 @@ Rectangle {
}
contentItem
:
Label
{
color
:
activePalette
.
text
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
text
:
label
.
text
+
'
(
'
+
timeline
.
simplifiedTC
(
clipRoot
.
inPoint
)
+
'
-
'
+
timeline
.
simplifiedTC
(
clipRoot
.
outPoint
)
+
'
)
'
}
}
...
...
@@ -355,7 +355,7 @@ Rectangle {
id
:
mlabel
visible
:
timeline
.
showMarkers
&&
parent
.
width
>
width
*
1.5
text
:
model
.
comment
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
x
:
markerBase
.
x
anchors
{
bottom
:
parent
.
verticalCenter
...
...
@@ -445,7 +445,7 @@ Rectangle {
}
contentItem
:
Label
{
color
:
activePalette
.
text
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
text
:
i18n
(
"
In:%1
\n
Position:%2
"
,
timeline
.
simplifiedTC
(
clipRoot
.
inPoint
),
timeline
.
simplifiedTC
(
clipRoot
.
modelStart
))
}
}
...
...
@@ -517,7 +517,7 @@ Rectangle {
}
contentItem
:
Label
{
color
:
activePalette
.
text
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
text
:
i18n
(
"
Out:
"
)
+
timeline
.
simplifiedTC
(
clipRoot
.
outPoint
)
}
}
...
...
@@ -573,7 +573,7 @@ Rectangle {
// Clip name text
id
:
label
text
:
clipName
+
(
clipRoot
.
speed
!=
1.0
?
'
[
'
+
Math
.
round
(
clipRoot
.
speed
*
100
)
+
'
%]
'
:
''
)
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
anchors
{
top
:
labelRect
.
top
left
:
labelRect
.
left
...
...
@@ -613,14 +613,14 @@ Rectangle {
}
contentItem
:
Label
{
color
:
activePalette
.
text
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
text
:
positionOffset
<
0
?
i18n
(
"
Offset: -%1
"
,
timeline
.
simplifiedTC
(
-
positionOffset
))
:
i18n
(
"
Offset: %1
"
,
timeline
.
simplifiedTC
(
positionOffset
))
}
}
Text
{
id
:
offsetLabel
text
:
positionOffset
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
anchors
{
horizontalCenter
:
parent
.
horizontalCenter
topMargin
:
1
...
...
@@ -646,7 +646,7 @@ Rectangle {
// Effect names text
id
:
effectLabel
text
:
clipRoot
.
effectNames
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
visible
:
effectsRect
.
visible
anchors
{
top
:
effectsRect
.
top
...
...
@@ -729,7 +729,7 @@ Rectangle {
}
contentItem
:
Label
{
color
:
activePalette
.
text
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
text
:
i18n
(
"
Click to add composition
"
)
}
}
...
...
@@ -773,7 +773,7 @@ Rectangle {
}
contentItem
:
Label
{
color
:
activePalette
.
text
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
text
:
i18n
(
"
Click to add composition
"
)
}
}
...
...
src/timeline2/view/qml/Composition.qml
View file @
b3b88adc
...
...
@@ -223,7 +223,7 @@ Item {
Text
{
id
:
label
text
:
clipName
+
(
compositionRoot
.
aTrack
>
-
1
?
'
>
'
+
timeline
.
getTrackNameFromMltIndex
(
compositionRoot
.
aTrack
)
:
''
)
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
anchors
{
top
:
labelRect
.
top
left
:
labelRect
.
left
...
...
src/timeline2/view/qml/Ruler.qml
View file @
b3b88adc
...
...
@@ -118,7 +118,7 @@ Rectangle {
anchors.top
:
parent
.
top
anchors.topMargin
:
2
text
:
timeline
.
timecode
(
parent
.
realPos
)
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
color
:
activePalette
.
windowText
}
}
...
...
@@ -189,7 +189,7 @@ Rectangle {
id
:
inLabel
anchors.fill
:
parent
text
:
timeline
.
timecode
(
timeline
.
zoneIn
)
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
color
:
activePalette
.
highlightedText
}
}
...
...
@@ -204,7 +204,7 @@ Rectangle {
id
:
outLabel
anchors.fill
:
parent
text
:
timeline
.
timecode
(
timeline
.
zoneOut
)
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
color
:
activePalette
.
highlightedText
}
}
...
...
@@ -221,7 +221,7 @@ Rectangle {
anchors.fill
:
parent
horizontalAlignment
:
Text
.
AlignHCenter
text
:
timeline
.
timecode
(
timeline
.
zoneOut
-
timeline
.
zoneIn
)
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
color
:
activePalette
.
highlightedText
}
}
...
...
src/timeline2/view/qml/Track.qml
View file @
b3b88adc
...
...
@@ -416,7 +416,7 @@ Item{
Text
{
id
:
speedLabel
text
:
i18n
(
"
Adjusting speed
"
)
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
anchors.fill
:
parent
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
...
...
src/timeline2/view/qml/TrackHead.qml
View file @
b3b88adc
...
...
@@ -130,7 +130,7 @@ Rectangle {
}
ToolTip
{
visible
:
targetArea
.
containsMouse
font
.pixelSize
:
root
.
baseUni
t
font
:
miniFon
t
delay
:
1500
timeout
:
5000
background
:
Rectangle
{
...
...
@@ -199,7 +199,7 @@ Rectangle {
}
ToolTip
{
visible
:
expandButton
.
hovered
font
.pixelSize
:
root
.
baseUni
t
font
:
miniFon
t
delay
:
1500
timeout
:
5000
background
:
Rectangle
{
...
...
@@ -212,95 +212,94 @@ Rectangle {
}
}
}
Item
{
id
:
tagContainer
Label
{
id
:
trackLed
property
color
bgColor
:
Qt
.
darker
(
trackHeadRoot
.
color
,
0.55
)
anchors.left
:
expandButton
.
right
width
:
trackHeadRoot
.
buttonSize
height
:
trackHeadRoot
.
buttonSize
//Layout.topMargin: 1
Rectangle
{
id
:
trackLed
color
:
Qt
.
darker
(
trackHeadRoot
.
color
,
0.55
)
font
:
miniFont
text
:
trackHeadRoot
.
trackTag
color
:
activePalette
.
text
background
:
Rectangle
{
color
:
trackLed
.
bgColor
}
FontMetrics
{
id
:
textMetricsLed
font
:
miniFont
}
height
:
parent
.
height
,
textMetricsLed
.
height
+
2
width
:
(
textMetricsLed
.
averageCharacterWidth
*
text
.
length
)
+
4
y
:
1
leftPadding
:
0
rightPadding
:
0
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
MouseArea
{
id
:
tagMouseArea
anchors.fill
:
parent
anchors.margins
:
trackHeadRoot
.
buttonSize
/
8
border.width
:
0
Text
{
id
:
trackTagLabel
text
:
trackHeadRoot
.
trackTag
anchors.fill
:
parent
font.pointSize
:
root
.
fontUnit
hoverEnabled
:
true
cursorShape
:
Qt
.
PointingHandCursor
onClicked
:
{
timeline
.
switchTrackActive
(
trackHeadRoot
.
trackId
)
}
}
ToolTip
{
visible
:
tagMouseArea
.
containsMouse
font
:
miniFont
delay
:
1500
timeout
:
5000
background
:
Rectangle
{
color
:
activePalette
.
alternateBase
border.color
:
activePalette
.
light
}
contentItem
:
Label
{
color
:
activePalette
.
text
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
text
:
i18n
(
"
Click to make track active/inactive. Active tracks will react to editing operations
"
)
}
MouseArea
{
id
:
tagMouseArea
anchors.fill
:
parent
hoverEnabled
:
true
cursorShape
:
Qt
.
PointingHandCursor
onClicked
:
{
timeline
.
switchTrackActive
(
trackHeadRoot
.
trackId
)
}
}
ToolTip
{
visible
:
tagMouseArea
.
containsMouse
font.pixelSize
:
root
.
baseUnit
delay
:
1500
timeout
:
5000
background
:
Rect
ang
l
e
{
color
:
activePalette
.
alternateBase
b
order.color
:
activePalette
.
light
state
:
'
normalled
'
states
:
[
State
{
name
:
'
locked
'
when
:
trackHeadRoot
.
isLocked
PropertyCh
ange
s
{
target
:
trackLed
b
gColor
:
'
red
'
}
contentItem
:
Label
{
color
:
activePalette
.
text
text
:
i18n
(
"
Click to make track active/inactive. Active tracks will react to editing operations
"
)
},
State
{
name
:
'
active
'
when
:
trackHeadRoot
.
isActive
PropertyChanges
{
target
:
trackLed
bgColor
:
timeline
.
targetColor
}
PropertyChanges
{
target
:
trackLed
color
:
timeline
.
targetTextColor
}
state
:
'
normalled
'
states
:
[
State
{
name
:
'
locked
'
when
:
trackHeadRoot
.
isLocked
PropertyChanges
{
target
:
trackLed
color
:
'
red
'
}
},
State
{
name
:
'
active
'
when
:
trackHeadRoot
.
isActive
PropertyChanges
{
target
:
trackLed
color
:
timeline
.
targetColor
}
PropertyChanges
{
target
:
trackTagLabel
color
:
timeline
.
targetTextColor
}
},
State
{
name
:
'
inactive
'
when
:
!
trackHeadRoot
.
isLocked
&&
!
trackHeadRoot
.
isActive
PropertyChanges
{
target
:
trackLed
color
:
Qt
.
darker
(
trackHeadRoot
.
color
,
0.55
)
}
},
State
{
name
:
'
inactive
'
when
:
!
trackHeadRoot
.
isLocked
&&
!
trackHeadRoot
.
isActive
PropertyChanges
{
target
:
trackLed
bgColor
:
Qt
.
darker
(
trackHeadRoot
.
color
,
0.55
)
}
]
transitions
:
[
T
ransition
{
to
:
'
*
'
ColorAnimation
{
target
:
trackLed
;
duration
:
300
}
}
]
}
}
]
t
ransition
s
:
[
Transition
{
to
:
'
*
'
ColorAnimation
{
target
:
trackLed
;
duration
:
300
}
}
]
}
Label
{
anchors.left
:
t
agContainer
.
right
anchors.left
:
t
rackLed
.
right
anchors.leftMargin
:
2
anchors.verticalCenter
:
parent
.
verticalCenter
text
:
trackHeadRoot
.
trackName
font
.pixelSize
:
root
.
baseUni
t
font
:
miniFon
t
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
visible
:
trackHeadRoot
.
collapsed
&&
trackHeadRoot
.
width
>
trackTarget
.
width
+
expandButton
.
width
+
trackTagLabel
.
width
+
(
4
*
muteButton
.
width
)
+
4
...
...
@@ -337,7 +336,7 @@ Rectangle {
onClicked
:
controller
.
setTrackProperty
(
trackId
,
"
hide
"
,
isDisabled
?
(
isAudio
?
'
1
'
:
'
2
'
)
:
'
3
'
)
ToolTip
{
visible
:
muteButton
.
hovered
font
.pixelSize
:
root
.
baseUni
t
font
:
miniFon
t
delay
:
1500
timeout
:
5000
background
:
Rectangle
{
...
...
@@ -362,7 +361,7 @@ Rectangle {
onClicked
:
controller
.
setTrackLockedState
(
trackId
,
!
isLocked
)
ToolTip
{
visible
:
lockButton
.
hovered
font
.pixelSize
:
root
.
baseUni
t
font
:
miniFon
t
delay
:
1500
timeout
:
5000
background
:
Rectangle
{
...
...
@@ -454,7 +453,7 @@ Rectangle {
anchors.left
:
parent
.
left
anchors.leftMargin
:
4
elide
:
Qt
.
ElideRight
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
}
Label
{
id
:
placeHolder
...
...
@@ -465,14 +464,14 @@ Rectangle {
anchors.left
:
parent
.
left
anchors.leftMargin
:
4
elide
:
Qt
.
ElideRight
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
}
TextField
{
id
:
nameEdit
visible
:
false
width
:
parent
.
width
text
:
trackName
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
background
:
Rectangle
{
radius
:
2
color
:
activePalette
.
window
...
...
src/timeline2/view/qml/timeline.qml
View file @
b3b88adc
...
...
@@ -1251,7 +1251,7 @@ Rectangle {
id
:
bubbleHelpLabel
color
:
activePalette
.
text
//application.toolTipTextColor
anchors.centerIn
:
parent
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
}
function
show
(
x
,
y
,
text
)
{
bubbleHelp
.
text
=
text
...
...
@@ -1370,7 +1370,7 @@ Rectangle {
id
:
mlabel
visible
:
timeline
.
showMarkers
text
:
model
.
comment
font
.pointSize
:
root
.
fontUni
t
font
:
miniFon
t
x
:
guideBase
.
x
+
2
y
:
scrollView
.
contentY
color
:
'
white
'
...
...
src/timeline2/view/timelinecontroller.cpp
View file @
b3b88adc
...
...
@@ -582,18 +582,32 @@ void TimelineController::addTrack(int tid)
int
newTid
;
bool
audioRecTrack
=
d
->
addRecTrack
();
bool
addAVTrack
=
d
->
addAVTrack
();
m_model
->
requestTrackInsertion
(
d
->
selectedTrackPosition
(),
newTid
,
d
->
trackName
(),
d
->
addAudioTrack
());
if
(
addAVTrack
)
{
int
newTid2
;
int
mirrorPos
=
0
;
int
mirrorId
=
m_model
->
getMirrorAudioTrackId
(
newTid
);
if
(
mirrorId
>
-
1
)
{
mirrorPos
=
m_model
->
getTrackMltIndex
(
mirrorId
);
Fun
undo
=
[]()
{
return
true
;
};
Fun
redo
=
[]()
{
return
true
;
};
bool
result
=
m_model
->
requestTrackInsertion
(
d
->
selectedTrackPosition
(),
newTid
,
d
->
trackName
(),
d
->
addAudioTrack
(),
undo
,
redo
);
if
(
result
)
{
m_model
->
setTrackProperty
(
newTid
,
"kdenlive:timeline_active"
,
QStringLiteral
(
"1"
));
if
(
addAVTrack
)
{
int
newTid2
;
int
mirrorPos
=
0
;
int
mirrorId
=
m_model
->
getMirrorAudioTrackId
(
newTid
);
if
(
mirrorId
>
-
1
)
{
mirrorPos
=
m_model
->
getTrackMltIndex
(
mirrorId
);
}
result
=
m_model
->
requestTrackInsertion
(
mirrorPos
,
newTid2
,
d
->
trackName
(),
true
,
undo
,
redo
);
if
(
result
)
{
m_model
->
setTrackProperty
(
newTid2
,
"kdenlive:timeline_active"
,
QStringLiteral
(
"1"
));
}
}
if
(
audioRecTrack
)
{
m_model
->
setTrackProperty
(
newTid
,
"kdenlive:audio_rec"
,
QStringLiteral
(
"1"
));
}
m_model
->
requestTrackInsertion
(
mirrorPos
,
newTid2
,
d
->
trackName
(),
true
);
}
if
(
audioRecTrack
)
{
m_model
->
setTrackProperty
(
newTid
,
"kdenlive:audio_rec"
,
QStringLiteral
(
"1"
));
if
(
result
)
{
pCore
->
pushUndo
(
undo
,
redo
,
addAVTrack
?
i18n
(
"Insert Tracks"
)
:
i18n
(
"Insert Track"
));
}
else
{
pCore
->
displayMessage
(
i18n
(
"Could not insert track"
),
InformationMessage
,
500
);
undo
();
}
}
}
...
...
@@ -3117,5 +3131,6 @@ void TimelineController::expandActiveClip()
pCore
->
pushUndo
(
undo
,
redo
,
i18n
(
"Expand clip"
));
}
else
{
undo
();
pCore
->
displayMessage
(
i18n
(
"Could not expand clip"
),
InformationMessage
,
500
);
}
}
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