Skip to content

element/text: do not cache preferred size - #122

Merged
vaxerski merged 3 commits into
hyprwm:mainfrom
BlueZeeKing:review
Aug 24, 2026
Merged

vaxerski merged 3 commits into
hyprwm:mainfrom
BlueZeeKing:review

Conversation

@BlueZeeKing

Copy link
Copy Markdown
Contributor

Currently, the preferred size of text depends on the previous size, which leads to oscilations and weird edge cases where text may not grow correctly. This also removes hacks around text using the max size of the parent not the actual size it was given. This does not impact performance because the pango layout is cached.

This does the same thing as #121

@vaxerski vaxerski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

some tests for this would be nice

Comment thread src/element/text/Text.cpp Resolved
@BlueZeeKing
BlueZeeKing force-pushed the review branch 3 times, most recently from c83afff to 3e60fd2 Compare August 22, 2026 22:53
@BlueZeeKing
BlueZeeKing marked this pull request as ready for review August 22, 2026 23:02
@BlueZeeKing
BlueZeeKing requested a review from vaxerski August 22, 2026 23:29
@BlueZeeKing
BlueZeeKing force-pushed the review branch 3 times, most recently from ca302e4 to c0e6d76 Compare August 23, 2026 21:40
@vaxerski

Copy link
Copy Markdown
Member

@codex review please

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c0e6d76305

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/element/text/Text.cpp Resolved
Comment thread src/element/text/Text.cpp Resolved
@BlueZeeKing
BlueZeeKing force-pushed the review branch 2 times, most recently from c0e6d76 to 6f53cef Compare August 24, 2026 14:53
@BlueZeeKing

Copy link
Copy Markdown
Contributor Author

I've reviewed this on my own with AI but for each fix I've written the code and tests

Currently, the preferred size of text depends on the previous size,
which leads to oscilations and weird edge cases where text may not grow
correctly. This also removes hacks around text using the max size of the
parent not the actual size it was given. This does not impact
performance because the pango layout is cached.
@vaxerski
vaxerski merged commit 9ba42b5 into hyprwm:main Aug 24, 2026
2 checks passed
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.

2 participants