From 1878630b591b039fadb6f88e15340d04f4af3ed1 Mon Sep 17 00:00:00 2001 From: Alexandre Van de Sande Date: Mon, 16 Feb 2015 14:34:47 +0100 Subject: Solved Issue #318 and added states to back button --- cmd/mist/assets/backButtonDisabled.png | Bin 0 -> 634 bytes cmd/mist/assets/backButtonDisabled@2x.png | Bin 0 -> 1458 bytes cmd/mist/assets/backButtonHover.png | Bin 0 -> 657 bytes cmd/mist/assets/backButtonHover@2x.png | Bin 0 -> 1517 bytes cmd/mist/assets/qml/main.qml | 2 +- cmd/mist/assets/qml/views/browser.qml | 39 +++++++++++++++--------------- 6 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 cmd/mist/assets/backButtonDisabled.png create mode 100644 cmd/mist/assets/backButtonDisabled@2x.png create mode 100644 cmd/mist/assets/backButtonHover.png create mode 100644 cmd/mist/assets/backButtonHover@2x.png (limited to 'cmd/mist') diff --git a/cmd/mist/assets/backButtonDisabled.png b/cmd/mist/assets/backButtonDisabled.png new file mode 100644 index 000000000..428747870 Binary files /dev/null and b/cmd/mist/assets/backButtonDisabled.png differ diff --git a/cmd/mist/assets/backButtonDisabled@2x.png b/cmd/mist/assets/backButtonDisabled@2x.png new file mode 100644 index 000000000..0eaa6daa5 Binary files /dev/null and b/cmd/mist/assets/backButtonDisabled@2x.png differ diff --git a/cmd/mist/assets/backButtonHover.png b/cmd/mist/assets/backButtonHover.png new file mode 100644 index 000000000..8c5226f5a Binary files /dev/null and b/cmd/mist/assets/backButtonHover.png differ diff --git a/cmd/mist/assets/backButtonHover@2x.png b/cmd/mist/assets/backButtonHover@2x.png new file mode 100644 index 000000000..406601ebc Binary files /dev/null and b/cmd/mist/assets/backButtonHover@2x.png differ diff --git a/cmd/mist/assets/qml/main.qml b/cmd/mist/assets/qml/main.qml index c9505806c..1272f8761 100644 --- a/cmd/mist/assets/qml/main.qml +++ b/cmd/mist/assets/qml/main.qml @@ -485,7 +485,7 @@ ApplicationWindow { label.visible = !on buttonLabel.visible = on } - + width: 192 height: 55 color: "#00000000" diff --git a/cmd/mist/assets/qml/views/browser.qml b/cmd/mist/assets/qml/views/browser.qml index a6f4e3d92..3a35c2a65 100644 --- a/cmd/mist/assets/qml/views/browser.qml +++ b/cmd/mist/assets/qml/views/browser.qml @@ -129,9 +129,9 @@ Rectangle { Button { id: back - - onClicked: { - webview.goBack() + z: 30 + onClicked: { + webview.goBack() } anchors { @@ -140,21 +140,23 @@ Rectangle { } style: ButtonStyle { - background: Image { - source: "../../backButton.png" - width: 20 - height: 30 - } + background: Image { + source: (webview.canGoBack) ? + (control.hovered ? "../../backButtonHover.png" : "../../backButton.png") : + "../../backButtonDisabled.png" + width: 20 + height: 30 + } } } Rectangle { - id: appInfoPane - height: 28 - color: "#FFFFFF" - radius: 6 - - MouseArea { + id: appInfoPane + height: 28 + color: "#FFFFFF" + radius: 6 + z:2 + MouseArea { anchors.fill: parent z: 10 hoverEnabled: true @@ -247,7 +249,7 @@ Rectangle { } } - z:2 + } Rectangle { @@ -256,6 +258,7 @@ Rectangle { height: 30 color: "#BDB6B6" radius: 6 + z:1 anchors { left: back.right @@ -264,19 +267,17 @@ Rectangle { rightMargin:10 top: parent.top topMargin: 23 - } - - z:1 + } } Rectangle { id: navBarBackground anchors.fill: parent + z:-1 gradient: Gradient { GradientStop { position: 0.0; color: "#F6F1F2" } GradientStop { position: 1.0; color: "#DED5D5" } } - z:-1 } states: [ -- cgit v1.2.3