Skip to content
GitLab
Menu
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
81004dca
Commit
81004dca
authored
Nov 29, 2019
by
Jean-Baptiste Mardelle
Browse files
Better qml font size calculation
parent
12dd330c
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/timeline2/view/qml/Clip.qml
View file @
81004dca
...
...
@@ -107,7 +107,7 @@ Rectangle {
}
ToolTip
{
visible
:
mouseArea
.
containsMouse
&&
!
dragProxyArea
.
pressed
font.p
ixel
Size
:
root
.
base
Unit
font.p
oint
Size
:
root
.
font
Unit
delay
:
1000
timeout
:
5000
background
:
Rectangle
{
...
...
@@ -327,7 +327,7 @@ Rectangle {
Text
{
id
:
label
text
:
clipName
+
(
clipRoot
.
speed
!=
1.0
?
'
[
'
+
Math
.
round
(
clipRoot
.
speed
*
100
)
+
'
%]
'
:
''
)
font.p
ixel
Size
:
root
.
baseUnit
*
1.2
font.p
oint
Size
:
root
.
fontUnit
anchors
{
top
:
labelRect
.
top
left
:
labelRect
.
left
...
...
@@ -358,7 +358,7 @@ Rectangle {
}
ToolTip
{
visible
:
offsetArea
.
containsMouse
font.p
ixel
Size
:
root
.
base
Unit
font.p
oint
Size
:
root
.
font
Unit
delay
:
1000
timeout
:
5000
background
:
Rectangle
{
...
...
@@ -373,7 +373,7 @@ Rectangle {
Text
{
id
:
offsetLabel
text
:
positionOffset
font.p
ixel
Size
:
root
.
baseUnit
*
1.2
font.p
oint
Size
:
root
.
fontUnit
anchors
{
horizontalCenter
:
parent
.
horizontalCenter
topMargin
:
1
...
...
@@ -397,7 +397,7 @@ Rectangle {
Text
{
id
:
effectLabel
text
:
clipRoot
.
effectNames
font.p
ixel
Size
:
root
.
baseUnit
*
1.2
font.p
oint
Size
:
root
.
fontUnit
anchors
{
top
:
effectsRect
.
top
left
:
effectsRect
.
left
...
...
@@ -448,7 +448,7 @@ Rectangle {
id
:
mlabel
visible
:
timeline
.
showMarkers
&&
parent
.
width
>
width
*
1.5
text
:
model
.
comment
font.p
ixel
Size
:
root
.
base
Unit
font.p
oint
Size
:
root
.
font
Unit
x
:
markerBase
.
x
anchors
{
bottom
:
parent
.
verticalCenter
...
...
@@ -536,7 +536,7 @@ Rectangle {
}
ToolTip
{
visible
:
compInArea
.
containsMouse
&&
!
dragProxyArea
.
pressed
font.p
ixel
Size
:
root
.
base
Unit
font.p
oint
Size
:
root
.
font
Unit
delay
:
1000
timeout
:
5000
background
:
Rectangle
{
...
...
@@ -586,7 +586,7 @@ Rectangle {
}
ToolTip
{
visible
:
compOutArea
.
containsMouse
&&
!
dragProxyArea
.
pressed
font.p
ixel
Size
:
root
.
base
Unit
font.p
oint
Size
:
root
.
font
Unit
delay
:
1000
timeout
:
5000
background
:
Rectangle
{
...
...
@@ -809,7 +809,7 @@ Rectangle {
ToolTip
{
visible
:
trimInMouseArea
.
containsMouse
&&
!
trimInMouseArea
.
pressed
font.p
ixel
Size
:
root
.
base
Unit
font.p
oint
Size
:
root
.
font
Unit
delay
:
1000
timeout
:
5000
background
:
Rectangle
{
...
...
@@ -891,7 +891,7 @@ Rectangle {
ToolTip
{
visible
:
trimOutMouseArea
.
containsMouse
&&
!
trimOutMouseArea
.
pressed
font.p
ixel
Size
:
root
.
base
Unit
font.p
oint
Size
:
root
.
font
Unit
delay
:
1000
timeout
:
5000
background
:
Rectangle
{
...
...
src/timeline2/view/qml/Composition.qml
View file @
81004dca
...
...
@@ -219,7 +219,7 @@ Item {
Text
{
id
:
label
text
:
clipName
+
(
compositionRoot
.
aTrack
>
-
1
?
'
>
'
+
timeline
.
getTrackNameFromMltIndex
(
compositionRoot
.
aTrack
)
:
''
)
font.p
ixel
Size
:
root
.
base
Unit
font.p
oint
Size
:
root
.
font
Unit
anchors
{
top
:
labelRect
.
top
left
:
labelRect
.
left
...
...
src/timeline2/view/qml/Ruler.qml
View file @
81004dca
...
...
@@ -28,7 +28,7 @@ Rectangle {
property
real
labelSpacing
:
labelSize
// The space we want between each ticks in the ruler
property
real
tickSpacing
:
timeline
.
scaleFactor
property
real
fontUnit
:
root
.
baseUnit
*
0.
9
property
real
fontUnit
:
root
.
baseUnit
*
0.
8
property
alias
rulerZone
:
zone
property
int
workingPreview
:
timeline
.
workingPreview
property
int
labelMod
:
1
...
...
src/timeline2/view/qml/TrackHead.qml
View file @
81004dca
...
...
@@ -103,7 +103,7 @@ Rectangle {
}
ColumnLayout
{
id
:
targetColumn
width
:
root
.
baseUnit
/
1
.3
width
:
trackTagLabel
.
width
*
.
3
height
:
trackHeadRoot
.
height
Item
{
width
:
parent
.
width
...
...
@@ -211,7 +211,7 @@ Rectangle {
tooltip
:
trackLabel
.
visible
?
i18n
(
"
Minimize
"
)
:
i18n
(
"
Expand
"
)
}
Item
{
width
:
trackTag
.
contentWidth
+
4
width
:
trackTag
Label
.
contentWidth
+
4
height
:
width
Layout.topMargin
:
1
Rectangle
{
...
...
@@ -222,10 +222,10 @@ Rectangle {
border.width
:
0
radius
:
2
Text
{
id
:
trackTag
id
:
trackTag
Label
text
:
trackHeadRoot
.
trackTag
anchors.fill
:
parent
font.p
ixel
Size
:
r
oot
.
baseUnit
*
1.5
font.p
oint
Size
:
r
ulerRoot
.
fontUnit
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
}
...
...
@@ -304,7 +304,7 @@ Rectangle {
font.pixelSize
:
root
.
baseUnit
verticalAlignment
:
Text
.
AlignVCenter
horizontalAlignment
:
Text
.
AlignHCenter
visible
:
trackHeadRoot
.
collapsed
&&
trackHeadRoot
.
width
>
trackTarget
.
width
+
expandButton
.
width
+
trackTag
.
width
+
(
5
*
muteButton
.
width
)
visible
:
trackHeadRoot
.
collapsed
&&
trackHeadRoot
.
width
>
trackTarget
.
width
+
expandButton
.
width
+
trackTag
Label
.
width
+
(
5
*
muteButton
.
width
)
}
Item
{
// Spacer
...
...
src/timeline2/view/qml/timeline.qml
View file @
81004dca
...
...
@@ -56,7 +56,7 @@ Rectangle {
playhead
.
fillColor
=
activePalette
.
windowText
ruler
.
repaintRuler
()
}
function
moveSelectedTrack
(
offset
)
{
var
cTrack
=
Logic
.
getTrackIndexFromId
(
timeline
.
activeTrack
)
var
newTrack
=
cTrack
+
offset
...
...
@@ -220,6 +220,7 @@ Rectangle {
property
int
headerWidth
:
timeline
.
headerWidth
()
property
int
activeTool
:
0
property
real
baseUnit
:
fontMetrics
.
font
.
pointSize
property
real
fontUnit
:
baseUnit
*
0.8
property
color
selectedTrackColor
:
Qt
.
rgba
(
activePalette
.
highlight
.
r
,
activePalette
.
highlight
.
g
,
activePalette
.
highlight
.
b
,
0.2
)
property
color
frameColor
:
Qt
.
rgba
(
activePalette
.
shadow
.
r
,
activePalette
.
shadow
.
g
,
activePalette
.
shadow
.
b
,
0.3
)
property
bool
autoScrolling
:
timeline
.
autoScroll
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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