Repository navigation
refactor: floatify messages - #6231
Merged
Merged
Conversation
Nerixyz
marked this pull request as ready for review
May 24, 2025 09:09
pajlada
approved these changes
May 24, 2025
pajlada
enabled auto-merge (squash)
May 24, 2025 09:33
4 tasks done
babicekmarek
pushed a commit
to babicekmarek/streamally-chatterino
that referenced
this pull request
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(motivation is in #6230)
This changes the layout to use
qreal(essentially adouble) instead ofint. The reason it's needed here is that when switching the font metrics to useqreal, we can get element-widths that aren't whole integers. The most notable effect is on spaces, because those should now render as desired by the font (we previously truncated them to be on DIP granularity).One thing to look out for is that now layouting and rendering might be slower because we use floating point arithmetic, however, I still think this is the right approach. We might be able to get away with using integers for the heights of messages, but I'm not sure how much impact that will have.
Fixes #6230.
At least on my PC (clang-cl + LTO), this isn't a huge performance hit in release mode. In debug mode it's a bit slower, but that's to be expected.