shoes4 icon indicating copy to clipboard operation
shoes4 copied to clipboard

gather_text_styles needs a class

Open jasonrclark opened this issue 11 years ago • 1 comments

Shoes::TextBlock#gather_text_styles could use some solid refactoring. In particular, it feels like there's a class lurking somewhere in how the array of arrays with widgets in them is represented that could be easier to reason about. Maybe it even wants a tree-like structure for the nested regions of text with different styling.

This will strongly impact some other TextBlock related classes, in particular the (not quite landed yet) FittedTextLayoutCollection which applies styling across flowed text layout ranges.

jasonrclark avatar Mar 21 '14 04:03 jasonrclark

:+1:

With widgets you mean different parts of the text block, e.g. in reality all the different spans that span different areas of the text block?

Totally agreed, that code is very procedural. Would love an extracted class!

PragTob avatar Mar 21 '14 09:03 PragTob