From 1d4952b09a48c6107497cc37d644b231fd5b22eb Mon Sep 17 00:00:00 2001 From: Michael Bohlender Date: Tue, 4 Apr 2017 10:27:24 +0200 Subject: add positivebutton component --- components/package/contents/ui/PositiveButton.qml | 47 +++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 components/package/contents/ui/PositiveButton.qml (limited to 'components/package/contents') diff --git a/components/package/contents/ui/PositiveButton.qml b/components/package/contents/ui/PositiveButton.qml new file mode 100644 index 00000000..83063668 --- /dev/null +++ b/components/package/contents/ui/PositiveButton.qml @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2017 Michael Bohlender, + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +import QtQuick 2.7 +import QtQuick.Controls 2.1 as Controls +import org.kube.components.theme 1.0 as KubeTheme + +Controls.AbstractButton { + id: root + + width: mainText.implicitWidth + KubeTheme.Units.largeSpacing * 2 + height: mainText.implicitHeight + KubeTheme.Units.smallSpacing * 2 + + clip: true + + Rectangle { + id: background + + anchors.fill: parent + + color: KubeTheme.Colors.positveColor + } + + Text { + id: mainText + + anchors.centerIn: parent + + color: KubeTheme.Colors.highlightedTextColor + text: root.text + } +} -- cgit v1.2.3