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
9a320f5e
Commit
9a320f5e
authored
Apr 15, 2020
by
Jean-Baptiste Mardelle
Browse files
Try to fix Windows default track size
Related to
#629
parent
e55ef934
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/mainwindow.cpp
View file @
9a320f5e
...
...
@@ -1758,14 +1758,15 @@ bool MainWindow::readOptions()
dir
.
mkpath
(
QStringLiteral
(
"."
));
KdenliveSettings
::
setDefaultprojectfolder
(
dir
.
absolutePath
());
}
QFont
ft
=
QFontDatabase
::
systemFont
(
QFontDatabase
::
SmallestReadableFont
);
// Default unit for timeline.qml objects size
int
baseUnit
=
qMax
(
28
,
(
int
)
(
QFontInfo
(
ft
).
pixelSize
()
*
1.8
+
0.5
));
if
(
KdenliveSettings
::
trackheight
()
==
0
)
{
QFont
ft
=
QFontDatabase
::
systemFont
(
QFontDatabase
::
SmallestReadableFont
);
int
trackHeight
=
qMax
(
50
,
(
int
)
(
3.6
*
QFontInfo
(
ft
).
pixelSize
()
+
6
));
int
trackHeight
=
qMax
(
50
,
2
*
baseUnit
+
6
);
KdenliveSettings
::
setTrackheight
(
trackHeight
);
}
if
(
KdenliveSettings
::
headerwidth
()
==
0
)
{
QFont
ft
=
QFontDatabase
::
systemFont
(
QFontDatabase
::
SmallestReadableFont
);
int
trackWidth
=
qMax
(
50
,
6
*
(
int
)(
1.8
*
QFontInfo
(
ft
).
pixelSize
()
+
2
));
int
trackWidth
=
qMax
(
50
,
6
*
(
baseUnit
+
2
));
KdenliveSettings
::
setHeaderwidth
(
trackWidth
);
}
bool
firstRun
=
false
;
...
...
src/timeline2/view/qml/AudioLevels.qml
View file @
9a320f5e
...
...
@@ -52,8 +52,6 @@ Item {
id
:
levelsContainer
width
:
recContainer
.
width
-
recbutton
.
width
-
6
height
:
recbutton
.
height
border.color
:
"
#000000
"
border.width
:
1
color
:
Qt
.
lighter
(
activePalette
.
base
)
Repeater
{
model
:
audiorec
.
levels
.
length
==
0
?
2
:
audiorec
.
levels
.
length
...
...
@@ -120,6 +118,13 @@ Item {
x
:
parent
.
width
*
(
index
+
1
)
/
9
}
}
Rectangle
{
// main frame
anchors.fill
:
parent
color
:
"
#00000000
"
border.color
:
"
#000000
"
border.width
:
1
}
}
}
}
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