aboutsummaryrefslogtreecommitdiff
path: root/components/StandardButton.qml
diff options
context:
space:
mode:
authordsc <xmrdsc@protonmail.com>2019-04-11 03:17:29 +0200
committerdsc <xmrdsc@protonmail.com>2019-04-24 05:37:35 +0200
commit42f7afaefddbf5a7929ddf88dbe7b27e7f40a669 (patch)
treecbbe7fc3e3950354f7a4dcb925b6e1e9dc62efd8 /components/StandardButton.qml
parent358e1d23facbd10fefbb2bf04c45b98f0c728ad0 (diff)
downloadmonzero-gui-42f7afaefddbf5a7929ddf88dbe7b27e7f40a669.tar.gz
monzero-gui-42f7afaefddbf5a7929ddf88dbe7b27e7f40a669.tar.xz
monzero-gui-42f7afaefddbf5a7929ddf88dbe7b27e7f40a669.zip
White theme
Diffstat (limited to 'components/StandardButton.qml')
-rw-r--r--components/StandardButton.qml14
1 files changed, 9 insertions, 5 deletions
diff --git a/components/StandardButton.qml b/components/StandardButton.qml
index e9e9a92a..05ee16a0 100644
--- a/components/StandardButton.qml
+++ b/components/StandardButton.qml
@@ -26,7 +26,7 @@
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import QtQuick 2.0
+import QtQuick 2.9
import QtQuick.Layouts 1.1
import "../components" as MoneroComponents
@@ -50,8 +50,7 @@ Item {
implicitHeight: height
implicitWidth: width
- function doClick() {
- // Android workaround
+ function doClick(){
releaseFocus();
clicked();
}
@@ -64,6 +63,7 @@ Item {
state: button.enabled ? "active" : "disabled"
Component.onCompleted: state = state
+
states: [
State {
name: "hover"
@@ -90,7 +90,9 @@ Item {
}
}
]
+
transitions: Transition {
+ enabled: appWindow.themeTransition
ColorAnimation { duration: 100 }
}
}
@@ -101,15 +103,16 @@ Item {
spacing: 11 * scaleRatio
anchors.centerIn: parent
- Text {
+ MoneroComponents.TextPlain {
id: label
font.family: MoneroComponents.Style.fontBold.name
font.bold: true
font.pixelSize: button.fontSize
color: !buttonArea.pressed ? button.textColor : "transparent"
visible: text !== ""
+ themeTransition: false
- Text {
+ MoneroComponents.TextPlain {
anchors.centerIn: parent
color: button.textColor
font.bold: label.font.bold
@@ -117,6 +120,7 @@ Item {
font.pixelSize: label.font.pixelSize - 1
text: label.text
opacity: buttonArea.pressed ? 1 : 0
+ themeTransition: false
}
}