You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My guess what is happening here. The TextEdit is moved out of the rectangle (as the size does not change) and the Renderer just skips the whole element, because it thinks it is not visible?
Winit-FemtoVG
FemtoVGCursorNextLine.webm
What happens here is that the cursor jumps into the second line (single-line is true). This breaks my shifting algorithm.
Winit-Skia
SkiaSingleLine.webm
So skia just ignores the single-line property.
Attempted solution
I then looked at how slint implemented the LineEdit and I saw, that you change the width too. The prefered width seems to reflect the content.
This seem to work, but there is one problem with this solution. I think it relates to this discussion #6797 . Somehow the TextEdit forces its width on the window, despite there is no Layout involved and its parent having an explicit width.
Width.webm
Second attempt
But I dug deeper, the slint LineEdit does not have this problem. And then I noticed it. The slint LineEdit is inside an empty component. #6821
Bug Description
I am creating a custom
LineEdit
and noticed several issues with the TextEdit. I want to move theTextEdit
to the left when the text gets to large.The
TextEdit
does not resize when its content changes. This causes several issues.QT Backend
QtTextDisappearing.webm
My guess what is happening here. The TextEdit is moved out of the rectangle (as the size does not change) and the Renderer just skips the whole element, because it thinks it is not visible?
Winit-FemtoVG
FemtoVGCursorNextLine.webm
What happens here is that the cursor jumps into the second line (
single-line
is true). This breaks my shifting algorithm.Winit-Skia
SkiaSingleLine.webm
So skia just ignores the
single-line
property.Attempted solution
I then looked at how slint implemented the
LineEdit
and I saw, that you change the width too. The prefered width seems to reflect the content.This seem to work, but there is one problem with this solution. I think it relates to this discussion #6797 . Somehow the
TextEdit
forces its width on the window, despite there is no Layout involved and its parent having an explicit width.Width.webm
Second attempt
But I dug deeper, the slint
LineEdit
does not have this problem. And then I noticed it. The slintLineEdit
is inside an empty component. #6821And indeed, this works as expected on all renderers. But will break if the wrapper component behaviour will change.
WrapperTextEdit.webm
Expected Behaviour
What do I expect to happen?
FocusScope
Reproducible Code (if applicable)
No response
Environment Details
Product Impact
No response
The text was updated successfully, but these errors were encountered: