Skip to content

Some text_editor QoL#2358

Merged
hecrj merged 1 commit into
iced-rs:masterfrom
bungoboingo:text-editor-font-size
Apr 2, 2024
Merged

Some text_editor QoL#2358
hecrj merged 1 commit into
iced-rs:masterfrom
bungoboingo:text-editor-font-size

Conversation

@bungoboingo

@bungoboingo bungoboingo commented Mar 29, 2024

Copy link
Copy Markdown
Contributor
  • Exposed the text_size & line_height fields in TextEditor
  • "Fixed" an issue with cosmic_text Wrap::Word which will not fall back to glyph in cases of very long words

@bungoboingo

bungoboingo commented Mar 30, 2024

Copy link
Copy Markdown
Contributor Author

Word wrapping issue:

word_wrapping.mov

(Issue is known: pop-os/cosmic-text#219)

After explicitly changing the wrap mode to "Glyph" we no longer overflow text buffer bounds in certain cases.

glyph_wrapping.mov

I believe this is better than using Wrap::Word since it removes some jank. Can go back to using default Word when this issue is fixed on cosmic_text side.

@bungoboingo bungoboingo changed the title Expose line_height & text_size fields for the text_editor widget Some text_editor QoL Mar 30, 2024
@bungoboingo bungoboingo force-pushed the text-editor-font-size branch from b18c7f4 to 846791e Compare March 30, 2024 00:43
@hojjatabdollahi

Copy link
Copy Markdown
Contributor

How does Wrap::Glyph wrap a normal sentence? Doesn't it just break the last word?

Comment thread graphics/src/text/editor.rs Outdated
@hecrj

hecrj commented Mar 30, 2024

Copy link
Copy Markdown
Member

It seems a fix may have been released in the latest cosmic-text version (pop-os/cosmic-text#219 (comment)).

I plan to update soon.

@hecrj hecrj added bug Something isn't working text widget layout fix labels Mar 30, 2024
@hecrj hecrj added this to the 0.13 milestone Mar 30, 2024
@bungoboingo bungoboingo force-pushed the text-editor-font-size branch from 846791e to 385a449 Compare April 1, 2024 16:29
@bungoboingo

Copy link
Copy Markdown
Contributor Author

I've reverted the last commit, just now just exposing those two methods 👍 Hopefully this is fixed in cosmic-text!

@hecrj hecrj 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.

Thanks! 🥳

@hecrj hecrj merged commit b17f890 into iced-rs:master Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants