Improve timeline AppImage font

parent 9c3e1531
Pipeline #17353 passed with stage
in 17 minutes and 47 seconds
......@@ -88,7 +88,7 @@ void Core::build(bool isAppImage, const QString &MltPath)
qRegisterMetaType<QVector<int>>();
qRegisterMetaType<QDomElement>("QDomElement");
qRegisterMetaType<requestClipInfo>("requestClipInfo");
if (isAppImage) {
QString appPath = qApp->applicationDirPath();
KdenliveSettings::setFfmpegpath(QDir::cleanPath(appPath + QStringLiteral("/ffmpeg")));
......
......@@ -222,14 +222,8 @@ Rectangle {
background: Rectangle {
color: trackLed.bgColor
}
FontMetrics {
id: textMetricsLed
font: miniFont
}
width: (Math.ceil(textMetricsLed.averageCharacterWidth * trackLed.text.length * 1.2))
width: fontMetrics.boundingRect("M").width * trackLed.text.length
y: 1
leftPadding:0
rightPadding:0
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
MouseArea {
......
......@@ -164,7 +164,10 @@ void TimelineWidget::setModel(const std::shared_ptr<TimelineItemModel> &model, M
rootContext()->setContextProperty("audiorec", pCore->getAudioDevice());
rootContext()->setContextProperty("guidesModel", pCore->projectManager()->current()->getGuideModel().get());
rootContext()->setContextProperty("clipboard", new ClipboardProxy(this));
rootContext()->setContextProperty("miniFont", QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont));
QFont ft = QFontDatabase::systemFont(QFontDatabase::GeneralFont);
ft.setPixelSize(QFontDatabase::systemFont(QFontDatabase::SmallestReadableFont).pixelSize());
setFont(ft);
rootContext()->setContextProperty("miniFont", font());
const QStringList effs = sortedItems(KdenliveSettings::favorite_effects(), false).values();
const QStringList trans = sortedItems(KdenliveSettings::favorite_transitions(), true).values();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment