aboutsummaryrefslogtreecommitdiff
path: root/components
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2017-11-12 18:45:06 +0100
committerSander Ferdinand <sa.ferdinand@gmail.com>2018-03-28 21:01:24 +0200
commitf49ad844b810c68415bc4daf78e7bc578529172a (patch)
tree0e99c087414968412446e08fafc19f2ee105f988 /components
parentf68ca5d76ead42bc9bd529cf41642caba20c6d40 (diff)
downloadmonzero-gui-f49ad844b810c68415bc4daf78e7bc578529172a.tar.gz
monzero-gui-f49ad844b810c68415bc4daf78e7bc578529172a.tar.xz
monzero-gui-f49ad844b810c68415bc4daf78e7bc578529172a.zip
Redoing the menu buttons
Diffstat (limited to 'components')
-rw-r--r--components/MenuButton.qml51
1 files changed, 35 insertions, 16 deletions
diff --git a/components/MenuButton.qml b/components/MenuButton.qml
index 778dca68..7c7b0426 100644
--- a/components/MenuButton.qml
+++ b/components/MenuButton.qml
@@ -27,6 +27,7 @@
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import QtQuick 2.0
+import QtGraphicalEffects 1.0
Rectangle {
id: button
@@ -55,9 +56,25 @@ Rectangle {
return offset
}
- color: checked ? "#FFFFFF" : "#1C1C1C"
+ color: "black"
property bool present: !under || under.checked || checked || under.numSelectedChildren > 0
- height: present ? ((appWindow.height >= 800) ? 48 * scaleRatio : 36 * scaleRatio ) : 0
+ height: present ? ((appWindow.height >= 800) ? 40 * scaleRatio : 52 * scaleRatio ) : 0
+
+ Item {
+ visible: parent.checked ? true : false
+ width: 300
+ height: 40
+
+ LinearGradient {
+ anchors.fill: parent
+ start: Qt.point(0, 0)
+ end: Qt.point(300, 0)
+ gradient: Gradient {
+ GradientStop { position: 1.0; color: "#333333" }
+ GradientStop { position: 0.0; color: "black" }
+ }
+ }
+ }
transform: Scale {
yScale: button.present ? 1 : 0
@@ -83,18 +100,18 @@ Rectangle {
anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.leftMargin: parent.getOffset()
- width: 50 * scaleRatio
+ width: 46 * scaleRatio
Rectangle {
id: dot
anchors.centerIn: parent
- width: 14 * scaleRatio
+ width: 8 * scaleRatio
height: width
radius: height / 2
Rectangle {
anchors.centerIn: parent
- width: 10 * scaleRatio
+ width: 8 * scaleRatio
height: width
radius: height / 2
color: "#1C1C1C"
@@ -112,31 +129,33 @@ Rectangle {
}
}
- Rectangle {
- anchors.left: parent.left
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- width: 1
- color: "#DBDBDB"
- visible: parent.checked
- }
+// Rectangle {
+// anchors.left: parent.left
+// anchors.top: parent.top
+// anchors.bottom: parent.bottom
+// width: 1
+// color: "#DBDBDB"
+// visible: parent.checked
+// }
+ // menu button arrow
Image {
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 20 * scaleRatio
anchors.leftMargin: parent.getOffset()
- source: "../images/menuIndicator.png"
+ source: "../images/right.png"
}
+ // menu button text
Text {
id: label
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
- anchors.leftMargin: parent.getOffset() + 50 * scaleRatio
+ anchors.leftMargin: parent.getOffset() + 38 * scaleRatio
font.family: "Arial"
font.pixelSize: 16 * scaleRatio
- color: parent.checked ? "#000000" : "#FFFFFF"
+ color: "#FFFFFF"
}
MouseArea {