Bug 466486

Summary: Timeline timestamp display pads frame number to 2 digits, even when project FPS is ≥100
Product: [Applications] kdenlive Reporter: Micha Lehmann <michalehmann0112>
Component: User Interface & MiscellaneousAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: minor    
Priority: NOR    
Version First Reported In: 22.12.2   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 23.04.0
Sentry Crash Report:

Description Micha Lehmann 2023-02-26 19:54:04 UTC
SUMMARY
The timeline's timestamp display display (hh:mm:ss:ff) always pads the frame number to 2 digits.
This is usually fine, but when working inside a project whose FPS is 100 or higher, this causes the UI element to rapidly change size when moving the cursor across the timeline. (Moving the cursor across the timeline changes the timestamp displayed, and when the current frame is now three-digits (100 or higher), the element has to expand to fit the text.)

STEPS TO REPRODUCE
1.  Create a new project with any preset, but change the FPS value to, say, 120.
2.  Move the cursor horizontally across the timeline.
    *   For added effect, zoom out the timeline so a small change in mouse position causes a big change in frame count.

OBSERVED RESULT
The timestamp display constantly changes size as a third digit is added or removed.

EXPECTED RESULT
The timestamp display automatically pads the framecount to the amount of digits required to display any amount in the project's current FPS.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.1
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Graphics Platform: Wayland
Comment 1 Jean-Baptiste Mardelle 2023-03-10 10:14:09 UTC
Git commit 16aaf392888853122140a218d5ff417cb6cc6373 by Jean-Baptiste Mardelle.
Committed on 10/03/2023 at 10:13.
Pushed by mardelle into branch 'master'.

Fix timecode display with fps > 100
FIXED-IN: 23.04.0

M  +17   -5    src/utils/timecode.cpp

https://invent.kde.org/multimedia/kdenlive/commit/16aaf392888853122140a218d5ff417cb6cc6373