toga icon indicating copy to clipboard operation
toga copied to clipboard

Draft: Add text wrap support for Label widget on Winform and GTK

Open ikus060 opened this issue 1 year ago • 1 comments

This PR is a draft to start a conversation regarding the addition of text wrapping to Label widget. As this is a critical feature for my user interface, I wish to get this implemented.

I need help to implement the feature for alternative backend. I can provide implementation for Linux, Windows and MacOS, but my experience with smart phone are too limited to propose an implementation.

Regarding the implementation, it's clearly not in it's final state. I simply submit the PR to discuss the direction and provide a proof of concept.

The current state of the API seams a bit too limited to support a good implementation. That why I added a new function compute_size() to recompute the height of widget. Pack make calls to compute_size() to recompute the height of widget after fixing width. I think we could make the implementation of the compute_size function optional as very few widget required it.

Whats do you think ?

ikus060 avatar Mar 01 '24 21:03 ikus060

There's some discussion of this at https://github.com/beeware/toga/issues/766#issuecomment-1155164170.

mhsmith avatar Mar 01 '24 22:03 mhsmith

Closing due to lack of response. If you intend to continue this work, let us know an we can re-open the PR.

freakboy3742 avatar Sep 14 '24 08:09 freakboy3742