diff options
author | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-09-12 21:48:19 +0200 |
---|---|---|
committer | Michael Bohlender <michael.bohlender@kdemail.net> | 2017-09-12 21:48:19 +0200 |
commit | 8ef95ba3d7164dab195a1135dfe8b00f6e881f09 (patch) | |
tree | de7e2a9cf740a71ac3587d124f03eff1aa1de8a8 | |
parent | 4dc56eb69675012f6e94b9c0f483d567acd76ed1 (diff) | |
download | kube-8ef95ba3d7164dab195a1135dfe8b00f6e881f09.tar.gz kube-8ef95ba3d7164dab195a1135dfe8b00f6e881f09.zip |
make html composer somhow work and break the rest
-rw-r--r-- | components/kube/contents/ui/ComposerView.qml | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/components/kube/contents/ui/ComposerView.qml b/components/kube/contents/ui/ComposerView.qml index 84c1ddc6..b5842dec 100644 --- a/components/kube/contents/ui/ComposerView.qml +++ b/components/kube/contents/ui/ComposerView.qml | |||
@@ -277,7 +277,6 @@ Kube.View { | |||
277 | 277 | ||
278 | text: checked ? "html" : "plain" | 278 | text: checked ? "html" : "plain" |
279 | checkable: true | 279 | checkable: true |
280 | |||
281 | } | 280 | } |
282 | 281 | ||
283 | Row { | 282 | Row { |
@@ -287,14 +286,23 @@ Kube.View { | |||
287 | Kube.IconButton { | 286 | Kube.IconButton { |
288 | iconName: Kube.Icons.bold | 287 | iconName: Kube.Icons.bold |
289 | checkable: true | 288 | checkable: true |
289 | checked: document.bold | ||
290 | onClicked: document.bold = !document.bold | ||
291 | focusPolicy: Qt.TabFocus | ||
290 | } | 292 | } |
291 | Kube.IconButton { | 293 | Kube.IconButton { |
292 | iconName: Kube.Icons.italic | 294 | iconName: Kube.Icons.italic |
293 | checkable: true | 295 | checkable: true |
296 | checked: document.italic | ||
297 | onClicked: document.italic = !document.italic | ||
298 | focusPolicy: Qt.TabFocus | ||
294 | } | 299 | } |
295 | Kube.IconButton { | 300 | Kube.IconButton { |
296 | iconName: Kube.Icons.underline | 301 | iconName: Kube.Icons.underline |
297 | checkable: true | 302 | checkable: true |
303 | checked: document.underline | ||
304 | onClicked: document.underline = !document.underline | ||
305 | focusPolicy: Qt.TabFocus | ||
298 | } | 306 | } |
299 | } | 307 | } |
300 | 308 | ||
@@ -325,14 +333,31 @@ Kube.View { | |||
325 | } | 333 | } |
326 | } | 334 | } |
327 | 335 | ||
328 | Kube.TextEditor { | 336 | Kube.DocumentHandler { |
337 | id: document | ||
338 | document: textEditor.textDocument | ||
339 | cursorPosition: textEditor.cursorPosition | ||
340 | selectionStart: textEditor.selectionStart | ||
341 | selectionEnd: textEditor.selectionEnd | ||
342 | //textColor: colorDialog.color | ||
343 | } | ||
344 | |||
345 | Kube.TextArea { | ||
346 | id: textEditor | ||
347 | |||
329 | Layout.fillWidth: true | 348 | Layout.fillWidth: true |
330 | Layout.fillHeight: true | 349 | Layout.fillHeight: true |
331 | activeFocusOnTab: true | 350 | |
332 | onActiveFocusChanged: closeFirstSplitIfNecessary() | 351 | textFormat: Qt.RichText |
333 | text: composerController.body | 352 | wrapMode: TextArea.Wrap |
334 | onTextChanged: composerController.body = text; | 353 | focus: true |
335 | Keys.onEscapePressed: recipients.forceActiveFocus() | 354 | selectByMouse: true |
355 | persistentSelection: true | ||
356 | |||
357 | // onActiveFocusChanged: closeFirstSplitIfNecessary() | ||
358 | // Keys.onEscapePressed: recipients.forceActiveFocus() | ||
359 | // text: document.text //composerController.body | ||
360 | // onTextChanged: composerController.body = text; | ||
336 | } | 361 | } |
337 | } | 362 | } |
338 | } | 363 | } |