-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
osc: avoid showing a double-minus-sign for time remaining #15255
base: master
Are you sure you want to change the base?
Conversation
Previously, if the current timestamp exceeded the nominal duration of the file (possible if the duration was incorrect, stream durations mismatched, etc), the time-remaining field would show eg "--00:00:00". With this change, it instead shows "00:00:00". The single minus sign is still present (to keep the field width consistent), but drawn fully transparent.
Lines 853 to 854 in a61518d
|
|
Download the artifacts for this pull request: |
Oh I see I misread the condition. I kind of disagree though. I don't see what's useful about negative numbers in the |
local alpha = normal_alpha | ||
if value:sub(1, 1) == '-' then | ||
value = value:sub(2) | ||
alpha = 255 | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps prepending a +
would be simpler than changing the color?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See PR description; I tried this and it didn't look good. (It'd probably look better in a different font.)
Previously, if the current timestamp exceeded the nominal duration of the file (possible if the duration was incorrect, stream durations mismatched, etc), the time-remaining field would show eg "--00:00:00".
With this change, it instead shows "00:00:00".
The single minus sign is still present (to keep the field width consistent), but drawn fully transparent.
I considered showing a plus sign instead, but this ends up looking pretty awkward baseline-rendering-wise, and results in a size jump as "-" is replaced by the wider "+" if the unicodeminus setting isn't enabled.