[vlc-commits] [Git][videolan/vlc][master] qml: fix comparing `VLCTime` and `VLCDuration`
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Sun Jun 29 12:39:05 UTC 2025
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
3cfffbaa by Fatih Uzunoglu at 2025-06-29T12:23:50+00:00
qml: fix comparing `VLCTime` and `VLCDuration`
Regression since 56195130.
- - - - -
1 changed file:
- modules/gui/qt/player/qml/ControlBar.qml
Changes:
=====================================
modules/gui/qt/player/qml/ControlBar.qml
=====================================
@@ -105,15 +105,9 @@ T.Pane {
text: {
// This text metrics is used for both the time and length, as we want them to have the same width.
// Length might not be reported in some cases, for that reason we should check both and use the bigger one.
- let t
- const time = Player.time
- const length = Player.length
- if (time > length)
- t = time
- else
- t = length
+
// Some extra space to compensate non-monospaced fonts ("-" takes more space than ":", double "-" for guarantee)
- return t.isSubHour() ? "00--00" : "00--00--00"
+ return (Player.time.isSubHour() && Player.length.isSubHour()) ? "00--00" : "00--00--00"
}
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3cfffbaa3d51b8d4957503701e80d38379faa66f
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/3cfffbaa3d51b8d4957503701e80d38379faa66f
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list