Let OrgEdit decide its own height

This commit is contained in:
Renaud Casenave-Péré 2022-12-07 08:58:42 +01:00
parent f4967150e4
commit ba93367c96
2 changed files with 1 additions and 5 deletions

View file

@ -9,7 +9,6 @@ TextArea {
property string lastText: index >= 0 ? content : ""
property bool textModified: false
property int fixedCursorPosition: -1
property int contentHeight
text: index > 0 ? sentinelChar + content : (index == 0 ? content : "")
@ -19,8 +18,6 @@ TextArea {
right: parent.right
}
height: contentHeight + _bottomMargin
textMargin: 0
textTopMargin: 0
wrapMode: Text.Wrap

View file

@ -3,9 +3,9 @@ import Sailfish.Silica 1.0
Item {
id: orgLine
height: label.visible ? label.contentHeight : edit.height
anchors {
left: parent.left
right: parent.right
}
@ -26,7 +26,6 @@ Item {
OrgEdit {
id: edit
contentHeight: label.contentHeight
visible: !label.visible
}