summaryrefslogtreecommitdiffstats
path: root/views/composer/qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-30 18:06:31 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-07-30 18:06:31 +0200
commit2bf195a1f5cbf5f473cbbcc929ad64d675e829cb (patch)
treef5070a61bb505fb66413a95c817a952367ffc08d /views/composer/qml
parent8dc99625d54dbe15816b4b4d0f6c87850289d30d (diff)
downloadkube-2bf195a1f5cbf5f473cbbcc929ad64d675e829cb.tar.gz
kube-2bf195a1f5cbf5f473cbbcc929ad64d675e829cb.zip
Removed the html switch.
Instead of having a switch we're going to always use an html editor, and simply send as plaintext if there is no formatting. To easily remove all formatting a button is added.
Diffstat (limited to 'views/composer/qml')
-rw-r--r--views/composer/qml/View.qml19
1 files changed, 6 insertions, 13 deletions
diff --git a/views/composer/qml/View.qml b/views/composer/qml/View.qml
index 1c08dda6..117c8e01 100644
--- a/views/composer/qml/View.qml
+++ b/views/composer/qml/View.qml
@@ -303,19 +303,7 @@ Kube.View {
303 303
304 spacing: Kube.Units.largeSpacing 304 spacing: Kube.Units.largeSpacing
305 305
306 Kube.Switch {
307 id: html
308 text: checked ? qsTr("plain") : qsTr("html")
309 focusPolicy: Qt.TabFocus
310 focus: false
311 checked: false
312 onCheckedChanged: {
313 textEditor.htmlEnabled = checked
314 }
315 }
316
317 Row { 306 Row {
318 visible: html.checked
319 spacing: 1 307 spacing: 1
320 308
321 Kube.IconButton { 309 Kube.IconButton {
@@ -342,6 +330,12 @@ Kube.View {
342 focusPolicy: Qt.TabFocus 330 focusPolicy: Qt.TabFocus
343 focus: false 331 focus: false
344 } 332 }
333 Kube.TextButton {
334 id: deleteButton
335 text: qsTr("Remove Formatting")
336 visible: textEditor.htmlEnabled
337 onClicked: textEditor.clearFormatting()
338 }
345 } 339 }
346 340
347 Item { 341 Item {
@@ -379,7 +373,6 @@ Kube.View {
379 Layout.fillWidth: true 373 Layout.fillWidth: true
380 Layout.fillHeight: true 374 Layout.fillHeight: true
381 onHtmlEnabledChanged: { 375 onHtmlEnabledChanged: {
382 html.checked = htmlEnabled
383 composerController.htmlBody = htmlEnabled; 376 composerController.htmlBody = htmlEnabled;
384 } 377 }
385 378