From 2bf195a1f5cbf5f473cbbcc929ad64d675e829cb Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 30 Jul 2018 18:06:31 +0200 Subject: 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. --- views/composer/qml/View.qml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'views/composer/qml/View.qml') 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 { spacing: Kube.Units.largeSpacing - Kube.Switch { - id: html - text: checked ? qsTr("plain") : qsTr("html") - focusPolicy: Qt.TabFocus - focus: false - checked: false - onCheckedChanged: { - textEditor.htmlEnabled = checked - } - } - Row { - visible: html.checked spacing: 1 Kube.IconButton { @@ -342,6 +330,12 @@ Kube.View { focusPolicy: Qt.TabFocus focus: false } + Kube.TextButton { + id: deleteButton + text: qsTr("Remove Formatting") + visible: textEditor.htmlEnabled + onClicked: textEditor.clearFormatting() + } } Item { @@ -379,7 +373,6 @@ Kube.View { Layout.fillWidth: true Layout.fillHeight: true onHtmlEnabledChanged: { - html.checked = htmlEnabled composerController.htmlBody = htmlEnabled; } -- cgit v1.2.3