anchors.right: parent.right
width: parent.width
// height: messageEditor.height > image.height ? messageEditor.height : image.height
- height: messageEditor.height
-
- Image {
- id: image
- anchors { left: parent.left; top: parent.top }
- }
+ height: charactersLeftRect.height + textEditRow.height
Rectangle {
id: charactersLeftRect
- height: childrenRect.height
- width: childrenRect.width
+ height: charactersLeft.height
+ width: charactersLeft.width
anchors.top: parent.top
anchors.horizontalCenter: messageEditorRect.horizontalCenter
+ border { color: "black"; width: 1 }
color: "white"
+ radius: 5
opacity: 0
+ Behavior on opacity { NumberAnimation { duration: animationDuration } }
+ }
+ Text {
+ id: charactersLeft
+ anchors.centerIn: charactersLeftRect
+ font.pixelSize: 14
+ opacity: 0
Behavior on opacity { NumberAnimation { duration: animationDuration } }
+ }
- Text {
- id: charactersLeft
- anchors.centerIn: parent
- font.pixelSize: 14
- }
+ Item {
+ id:textEditRow
+ anchors { left: parent.left; top: charactersLeftRect.bottom; topMargin: 2; right: parent.right }
+ height: messageEditor.height
+ }
+
+ Image {
+ id: image
+ anchors { left: parent.left; top: textEditRow.top }
}
Rectangle {
ExtendedTextEdit {
id: messageEditor
- anchors { leftMargin: 5; left: image.right; right: buttonsArea.left; rightMargin: 5; top: parent.top }
+ anchors { leftMargin: 5; left: image.right; right: buttonsArea.left; rightMargin: 5; top: textEditRow.top }
height: paintedHeight > buttonsArea.height ? paintedHeight : buttonsArea.height
onActiveFocusChanged: {
if (activeFocus)
Item {
id: buttonsArea
anchors {
- top: parent.top
+ top: textEditRow.top
right: cancelButton.right
left: cancelButton.right
- bottom: parent.top
+ bottom: textEditRow.top
}
}
target: charactersLeftRect
opacity: 0.3
}
-
+ PropertyChanges {
+ target: charactersLeft
+ opacity: 0.8
+ }
PropertyChanges {
target: cancelButton
scale: 1
AnchorChanges {
target: buttonsArea
anchors.left: cancelButton.left
- anchors.bottom: cancelButton.bottom
- }
- AnchorChanges {
- target: messageEditor
- anchors.top: charactersLeftRect.bottom
+ anchors.bottom: textEditRow.bottom
}
}
]
ParallelAnimation {
NumberAnimation { target: cancelButton; properties: "scale"; duration: animationDuration }
AnchorAnimation { targets: buttonsArea; duration: animationDuration }
- AnchorAnimation { targets: charactersLeft; duration: animationDuration }
NumberAnimation { target: messageEditor; properties: "height"; duration: animationDuration }
}
}