mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Add character wrapping for Qt Backend
This adds a new wrapping mode called `char-wrap`, which allows for wrapping at any character. Currently, it only supports the Qt backend, with the other backends falling back to `word-wrap` when this option is selected.
This commit is contained in:
parent
eb60c26398
commit
9f63d157d1
13 changed files with 66 additions and 28 deletions
|
@ -61,7 +61,7 @@ export component TextEditBase inherits Rectangle {
|
|||
y: root.scroll-view-padding;
|
||||
width: parent.width - 2 * root.scroll-view-padding;
|
||||
height: parent.height - 2 * root.scroll-view-padding;
|
||||
viewport-width: root.wrap == TextWrap.word-wrap ? self.visible-width : max(self.visible-width, text-input.preferred-width);
|
||||
viewport-width: root.wrap == TextWrap.no-wrap ? max(self.visible-width, text-input.preferred-width) : self.visible-width;
|
||||
viewport-height: max(self.visible-height, text-input.preferred-height);
|
||||
|
||||
text-input := TextInput {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue