-
-
Notifications
You must be signed in to change notification settings - Fork 460
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
Improve Appearance of Reply Curve #4077
Conversation
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.
clang-tidy made some suggestions
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.
The curve looks great, but the change to compact emotes needs to be undone. It's fine if the setting is removed, since it's on by default and unconfigurable but the logic for compact emotes must stay.
2022-10-22.11-17-11.mp4
c7a74b5
to
5f61cec
Compare
I returned the compact emote rendering logic. Didn't realize that the setting was enabled by default 😅 |
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.
clang-tidy made some suggestions
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.
I feel like this change is a bit too complex for what it gives, let's maybe start with only changing the curve of the line and work on the layout changes at another point - Sorry for the back-and-forth
The compactEmotes setting removal can still stay
5f61cec
to
cf1c994
Compare
I've gone ahead and removed the vertically expanding element stuff so that this PR now only includes adjustments to the shape of the reply curve itself. If anyone is interested in playing around with the curve parameters, you can modify the constants here: |
Thank you! 🙇 |
Pull request checklist:
CHANGELOG.md
was updated, if applicableDescription
Improves the overall appearance of the reply curve. Related: #4009
Curve drawing parameters are defined here and can be tuned if people feel that some other value set would look better:
https://github.com/dnsge/chatterino2/blob/cf1c994cb4c5bae40c27af172e233965e84ca016/src/messages/MessageElement.cpp#L687-L690
New Appearance:
The vertical expanding nature of the reply curve has been removed from this PR. I will create another PR for the logic.
DescriptionOutdatedImproves the overall appearance of the reply curve. Related: #4009
The vertical growth works as follows:
MessageLayoutElement
and find every instance ofVerticalExpandingMessageLayoutElement
VerticalExpandingMessageLayoutElement
, if there is a line below it, we find the top of the elements directly beneath itThis screenshot + drawing sort of show the process:
We identify the elements that are below the reply curve element and consider their bounding boxes. In this example, we don't need to worry about the two badges because they aren't directly below the reply curve. We then grow the bottom of the reply curve to meet the top of the timestamp.
The top of our reply curve remains unmoved; when we constructed the reply curve element, we gave it a zero height and told the
MessageLayoutContainer
to center it vertically in the line (new to this PR).If we manually increase the width of the reply curve, we can see how the curve chooses the tallest element beneath it: