From 26037ebce96b571037008f0234fea1535a40ae72 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 25 Jul 2017 01:11:46 +0200 Subject: TextButton based on AbstractButton --- .../kube/contents/ui/AddresseeListEditor.qml | 2 +- framework/qml/TextButton.qml | 25 +++------------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/components/kube/contents/ui/AddresseeListEditor.qml b/components/kube/contents/ui/AddresseeListEditor.qml index 25916315..adb2f785 100644 --- a/components/kube/contents/ui/AddresseeListEditor.qml +++ b/components/kube/contents/ui/AddresseeListEditor.qml @@ -86,7 +86,7 @@ FocusScope { Kube.TextButton { id: button text: "+ " + qsTr("Add recipient") - color: Kube.Colors.highlightColor + textColor: Kube.Colors.highlightColor focus: true onClicked: { lineEdit.visible = true diff --git a/framework/qml/TextButton.qml b/framework/qml/TextButton.qml index 4d7ea27d..ff4bf1a6 100644 --- a/framework/qml/TextButton.qml +++ b/framework/qml/TextButton.qml @@ -16,28 +16,9 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import QtQuick 2.7 -import QtQuick.Templates 2.0 as T import org.kube.framework 1.0 -T.Button { - id: root - - property alias color: label.color - - width: Math.max(Units.gridUnit, contentItem.implicitWidth + leftPadding + rightPadding) - height: contentItem.implicitHeight + topPadding + bottomPadding - - clip: true - hoverEnabled: true - Keys.onReturnPressed: root.clicked() - - contentItem: Label { - id: label - text: root.text - font.underline: root.activeFocus || root.hovered - elide: Text.ElideRight - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - } +AbstractButton { + color: "transparent" + padding: Units.smallSpacing } -- cgit v1.2.3