Skip to content

Commit bd7a18b

Browse files
committed
fix font size in text presets not applying
https://forum.shotcut.org/t/cant-lengthen-subtitles/47079/10
1 parent f2b2a9d commit bd7a18b

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

src/qml/filters/dynamictext/ui.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2024 Meltytech, LLC
2+
* Copyright (c) 2014-2025 Meltytech, LLC
33
*
44
* This program is free software: you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
@@ -164,6 +164,7 @@ Shotcut.KeyframableFilter {
164164
parameters: textFilterUi.parameterList.concat(['argument'])
165165
onBeforePresetLoaded: {
166166
filter.resetProperty(textFilterUi.rectProperty);
167+
filter.set(textFilterUi.pointSizeProperty, 0);
167168
resetSimpleKeyframes();
168169
}
169170
onPresetSelected: {

src/qml/filters/gpstext/ui.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022-2024 Meltytech, LLC
2+
* Copyright (c) 2022-2025 Meltytech, LLC
33
*
44
* This program is free software: you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
@@ -686,6 +686,7 @@ Shotcut.KeyframableFilter {
686686
parameters: textFilterUi.parameterList.concat(['argument'])
687687
onBeforePresetLoaded: {
688688
filter.resetProperty(textFilterUi.rectProperty);
689+
filter.set(textFilterUi.pointSizeProperty, 0);
689690
resetSimpleKeyframes();
690691
}
691692
onPresetSelected: {

src/qml/filters/subtitle/ui.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024 Meltytech, LLC
2+
* Copyright (c) 2024-2025 Meltytech, LLC
33
*
44
* This program is free software: you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
@@ -90,6 +90,7 @@ Shotcut.KeyframableFilter {
9090
parameters: textFilterUi.parameterList.concat(['feed'])
9191
onBeforePresetLoaded: {
9292
filter.resetProperty(textFilterUi.rectProperty);
93+
filter.set(textFilterUi.pointSizeProperty, 0);
9394
resetSimpleKeyframes();
9495
}
9596
onPresetSelected: {

src/qml/filters/timer/ui.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018-2024 Meltytech, LLC
2+
* Copyright (c) 2018-2025 Meltytech, LLC
33
*
44
* This program is free software: you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
@@ -124,6 +124,7 @@ Shotcut.KeyframableFilter {
124124
parameters: textFilterUi.parameterList.concat(['format', 'direction', 'start', 'duration'])
125125
onBeforePresetLoaded: {
126126
filter.resetProperty(textFilterUi.rectProperty);
127+
filter.set(textFilterUi.pointSizeProperty, 0);
127128
resetSimpleKeyframes();
128129
}
129130
onPresetSelected: {

src/qml/modules/Shotcut/Controls/TextFilterUi.qml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014-2023 Meltytech, LLC
2+
* Copyright (c) 2014-2025 Meltytech, LLC
33
*
44
* This program is free software: you can redistribute it and/or modify
55
* it under the terms of the GNU General Public License as published by
@@ -67,7 +67,7 @@ GridLayout {
6767
var pointSize = parseInt(filter.get(pointSizeProperty));
6868
if (!pointSize) {
6969
var ratio = fontDialog.selectedFont.pointSize / fontDialog.selectedFont.pixelSize;
70-
pointSize = filter.get('size') * ratio;
70+
pointSize = Math.round(filter.get('size') * ratio);
7171
}
7272
return pointSize;
7373
}

0 commit comments

Comments
 (0)