Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Page {
- objectName: "localCommentPage"
- id: localCommentPage
- tools: basicTools
- orientationLock: PageOrientation.Automatic
- function setTextAreaSize() {
- resizeTextArea()
- container.contentY = 0
- }
- function resizeTextArea () {
- commentArea.width = parent.width
- commentArea.height = commentArea.text.paintedHeight
- }
- Rectangle {
- id: commentRec
- anchors.fill: parent
- color: "#BBB"
- Flickable {
- id: container
- x: 0
- y: 0
- width: parent.width
- height: parent.height
- contentWidth: commentArea.width
- contentHeight: Math.max(parent.height,commentArea.height)
- TextArea {
- id: commentArea
- width: parent.width
- // height: text.paintedHeight
- // anchors.fill: parent
- readOnly: true
- font.pixelSize: 32
- text: rootWindow.localCommentText
- wrapMode: TextEdit.Wrap
- }
- }
- ScrollDecorator {
- id: scrolldecorator
- flickableItem: container
- }
- }
- onRotationChanged: {
- console.log("LocalCommentPage: Screen rotated!")
- setTextAreaSize()
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement