summaryrefslogtreecommitdiff
path: root/qml/NewPostSheet.qml
blob: 96de9bc520f1b279d6839a485d271fe679e41cdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import QtQuick 1.1
import com.nokia.meego 1.1
import com.nokia.extras 1.1
import com.javispedro.tapasboard 1.0

Sheet {
	id: newPostSheet

	property Board board;
	property int topicId;

	anchors.leftMargin: UiConstants.DefaultMargin
	anchors.rightMargin: UiConstants.DefaultMargin

	acceptButtonText: qsTr("Submit")
	rejectButtonText: qsTr("Cancel")

	content: TextArea {
		id: postText
		anchors {
			fill: parent
		}

		platformStyle: TextAreaStyle {
			background: "image://theme/meegotouch-sheet-inputfield-background"
			backgroundSelected: background
			backgroundDisabled: ""
		}

		placeholderText: qsTr("Write your reply here")
		focus: true
		wrapMode: TextEdit.Wrap
	}

	onAccepted: {
		board.replyToTopic(topicId, postText.text)
	}
}