aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcryptochangements34 <bW9uZXJv@gmail.com>2017-11-20 20:16:53 -0500
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-03-29 23:04:00 +0100
commitf6f26af7cbe231505b2494f6fa538f026b7fa584 (patch)
treedfd0183483946a2a275121eb8a72c8497815335b
parentf15d6f5197c07cb25e97f7fb04d54c5775646224 (diff)
downloadmonzero-gui-f6f26af7cbe231505b2494f6fa538f026b7fa584.tar.gz
monzero-gui-f6f26af7cbe231505b2494f6fa538f026b7fa584.tar.xz
monzero-gui-f6f26af7cbe231505b2494f6fa538f026b7fa584.zip
use PNG for menuButton gradiency
-rw-r--r--components/MenuButton.qml24
-rw-r--r--images/menuButtonGradient.pngbin0 -> 3994 bytes
-rw-r--r--qml.qrc1
3 files changed, 12 insertions, 13 deletions
diff --git a/components/MenuButton.qml b/components/MenuButton.qml
index 4321d248..afc2421a 100644
--- a/components/MenuButton.qml
+++ b/components/MenuButton.qml
@@ -61,19 +61,6 @@ Rectangle {
property bool present: !under || under.checked || checked || under.numSelectedChildren > 0
height: present ? ((appWindow.height >= 800) ? 44 * scaleRatio : 38 * scaleRatio ) : 0
- // Button gradient whilst checked
- // @TODO: replace by .png - gradient not available in 2d renderer
- LinearGradient {
- visible: button.checked ? true : false
- 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" }
- }
- }
-
// button decorations that are subject to leftMargin offsets
Rectangle {
anchors.left: parent.left
@@ -114,6 +101,17 @@ Rectangle {
}
}
+ // button gradient while checked
+ Image {
+ width: 160
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ anchors.rightMargin: 0
+ anchors.leftMargin: parent.getOffset()
+ source: "../images/menuButtonGradient.png"
+ visible: button.checked
+ }
+
// menu button right arrow
Image {
anchors.verticalCenter: parent.verticalCenter
diff --git a/images/menuButtonGradient.png b/images/menuButtonGradient.png
new file mode 100644
index 00000000..616f72c1
--- /dev/null
+++ b/images/menuButtonGradient.png
Binary files differ
diff --git a/qml.qrc b/qml.qrc
index 7f5b673c..d7ea0e1d 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -178,6 +178,7 @@
<file>images/titlebarGradient.jpg</file>
<file>images/titlebarLogo.png</file>
<file>images/menuArrow.png</file>
+ <file>images/menuButtonGradient.png</file>
<file>fonts/SFUIDisplay-Medium.otf</file>
<file>fonts/SFUIDisplay-Regular.otf</file>
<file>fonts/SFUIDisplay-Light.otf</file>