-
Notifications
You must be signed in to change notification settings - Fork 88
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
WIP: Ellipsize #84
base: main
Are you sure you want to change the base?
WIP: Ellipsize #84
Conversation
The elipsis seems to be overlapping the switch (to it's right) here. That doesn't seem right...
IMO it would make sense to also make it available for |
That's actually the switch overlapping with the text. I wish I could set a minimum width for the UI elements in Iced! Regarding the multi-line ellipsizing, it would increase the complexity, especially because I'm thinking the multi-line ellipsization should happen in Buffer and not Bufferline to allow for ellipsizing multi-paragraph labels. |
Ah, yeah. Iced's layout is... a bit lacking.
Hmm... ok. Well, I'll defer to your expertise on this issue! |
Please don't! I'll take any help I can get. With multi-line ellipsize, I think GTK does it with a |
9f7ef71
to
99a17c7
Compare
Hi, was just wondering if this is still being worked on? I was going to implement this in my UI framework but then noticed this PR to add it at the cosmic-text level. |
Hi, I have been super busy irl. But this and a few RTL features are definitely somethings I will do. However, if you want to take over or help out, I would be happy. This was my plan: |
This is just the beginning for Ellipsize, and I have questions! I would appreciate any feedback.
Here is the Ellipsize enum, I think multi-line ellipsization would only be useful for
Ellipsize::End
:Current implementation:
Text
. I think it should be stored in any widget that usesBufferLine
. For example a label can have multiple paragraphs, but if I want it to ellipsize after 5 lines, it should happen regardless of how many paragraphs fit in those 5 lines. I doubt that we want to have ellipsizing per paragraph.Questions:
1- Do we want ellipsis based on height? Depending on the font size you might be able to fit more or fewer lines in the same text area.
2- When it comes to text selection, what should happen? If I create a label with some of the text ellipsized, and then select the text (including the ellipsis) and copy it, does that mean I copy the ellipsis character? or the hidden text?