diff options
| author | Sander Ferdinand <sa.ferdinand@gmail.com> | 2017-12-06 22:55:39 +0100 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-03-29 23:04:01 +0100 |
| commit | 3d5fee0a2f20d0456f9ec80c4c1779df0fa6e392 (patch) | |
| tree | 72d1e8112d67df4508e21248e86762fb0a256366 /components/StandardButton.qml | |
| parent | 8295b9dffd71e859f3738a8b58e0d1c1fea7b9d9 (diff) | |
| download | monzero-gui-3d5fee0a2f20d0456f9ec80c4c1779df0fa6e392.tar.gz monzero-gui-3d5fee0a2f20d0456f9ec80c4c1779df0fa6e392.tar.xz monzero-gui-3d5fee0a2f20d0456f9ec80c4c1779df0fa6e392.zip | |
StandardButton/StandardDropdown QML development
Diffstat (limited to 'components/StandardButton.qml')
| -rw-r--r-- | components/StandardButton.qml | 48 |
1 files changed, 25 insertions, 23 deletions
diff --git a/components/StandardButton.qml b/components/StandardButton.qml index 99917752..b7c020e9 100644 --- a/components/StandardButton.qml +++ b/components/StandardButton.qml @@ -28,17 +28,18 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 +import "." 1.0 Item { id: button height: 37 * scaleRatio - property string shadowPressedColor: "#B32D00" - property string shadowReleasedColor: "#FF4304" - property string pressedColor: "#FF4304" - property string releasedColor: "#FF6C3C" + property string shadowPressedColor: Style.buttonBackgroundColor + property string shadowReleasedColor: Style.buttonBackgroundColor + property string pressedColor: Style.buttonBackgroundColor + property string releasedColor: Style.buttonBackgroundColor property string icon: "" - property string textColor: "#FFFFFF" - property int fontSize: 12 * scaleRatio + property string textColor: button.enabled? Style.buttonTextColor: Style.buttonTextColorDisabled + property int fontSize: 18 * scaleRatio property alias text: label.text signal clicked() @@ -56,30 +57,31 @@ Item { anchors.right: parent.right height: parent.height - 1 y: buttonArea.pressed ? 0 : 1 - //radius: 4 - color: { - parent.enabled ? (buttonArea.pressed ? parent.shadowPressedColor : parent.shadowReleasedColor) - : Qt.lighter(parent.shadowReleasedColor) - } + radius: 3 + color: parent.enabled ? Style.buttonBackgroundColor : Style.buttonBackgroundColorDisabled +// color: { +// parent.enabled ? (buttonArea.pressed ? parent.shadowPressedColor : parent.shadowReleasedColor) +// : Qt.lighter(parent.shadowReleasedColor) +// } border.color: Qt.darker(parent.releasedColor) border.width: parent.focus ? 1 : 0 } - Rectangle { - anchors.left: parent.left - anchors.right: parent.right - height: parent.height - 1 - y: buttonArea.pressed ? 1 : 0 - color: { - parent.enabled ? (buttonArea.pressed ? parent.pressedColor : parent.releasedColor) - : Qt.lighter(parent.releasedColor) +// Rectangle { +// anchors.left: parent.left +// anchors.right: parent.right +// height: parent.height - 1 +// y: buttonArea.pressed ? 1 : 0 +// color: { +// parent.enabled ? (buttonArea.pressed ? parent.pressedColor : parent.releasedColor) +// : Qt.lighter(parent.releasedColor) - } - //radius: 4 +// } +// //radius: 4 - } +// } Text { id: label @@ -87,7 +89,7 @@ Item { anchors.left: parent.left anchors.right: parent.right horizontalAlignment: Text.AlignHCenter - font.family: "Arial" + font.family: Style.fontBold.name font.bold: true font.pixelSize: button.fontSize color: parent.textColor |
