Skip to content

Conversation

@Oekn5w
Copy link

@Oekn5w Oekn5w commented Nov 12, 2025

#28 missed to account for the accuracy settings during width determination.
I've copied over the code from the SplitComponent that handles the rendering of the times/deltas

Resolves the issue reported in LiveSplit/LiveSplit#2633 and others (closed because of reverting) and resolves LiveSplit/LiveSplit#2616.

Tested by cycling the accuracy with 10+ hours splits and 9+ hours deltas.
No custom variables available atm to test those.

@Oekn5w
Copy link
Author

Oekn5w commented Nov 12, 2025

I've constructed the commit so that original code ownership might hopefully be preserved while being mergable
image

Comment on lines +31 to +33
protected TimeAccuracy CurrentAccuracy { get; set; }
protected TimeAccuracy CurrentDeltaAccuracy { get; set; }
protected bool CurrentDropDecimals { get; set; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are these new properties necessary? Is there a reason why just using Settings.SplitTimesAccuracy, Settings.DeltasAccuracy, and Settings.DropDecimals wouldn't work properly in some case?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess the alternative would be to make a new SplitTimeFormatter and a new DeltaSplitTimeFormatter on every tick instead of just on the ticks where one of the settings changed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay yeah, what you're doing seems better, and it's what the LabelsComponent was doing before, and what the SplitComponent was doing and is still doing, so it fits in well with that

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, my initial idea was to modify the timeformatters, but I didn't actually check if that is possible. I just copied over the things from the other components once I noticed how they are doing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fixed-width columns aren't growing to display longer times

2 participants