Skip to content

Create SelectableText, deprecate SelectableLabel

Akseli Lahtinen requested to merge work/akselmo/create-selectable-text into master

This creates a new SelectableText element that is supposed to replace SelectableLabel due to resizing issues.

SelectableLabel uses TextArea, which has features Label does not really need. TextArea also has issues when resizing, since the ImplicitSize resizing is disabled after the initialization. This can cause problems with dynamically changing content, where the TextArea size wont update based on the content.

TextEdit has ImplicitSizes as read-only, but it resizes automatically based on the text content.

SelectableText also has a simpler context menu, with only Copy and SelectAll buttons.

I chose the name SelectableText since this is based on TextEdit, not label. (But I welcome any name suggestions if there's something better :) )

CCBUG:493581

Merge request reports

Loading