From f6f26af7cbe231505b2494f6fa538f026b7fa584 Mon Sep 17 00:00:00 2001 From: cryptochangements34 Date: Mon, 20 Nov 2017 20:16:53 -0500 Subject: [PATCH] use PNG for menuButton gradiency --- components/MenuButton.qml | 24 +++++++++++------------- images/menuButtonGradient.png | Bin 0 -> 3994 bytes qml.qrc | 1 + 3 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 images/menuButtonGradient.png 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 0000000000000000000000000000000000000000..616f72c1afff441de221cae0c78e1761d23d90da GIT binary patch literal 3994 zcmV;L4`uL)P){ZFaEh000j;NklsFe}0OELj6?LQ&m4ze2VoH>M7#>piZ1PM}yj{<&ZE``)i{-iPX+`CPu^?E9S0@Hx-c z@B39%{r%40tVQiy_BB~gfzMN4e|Y}(S2$nc{0LQr_q!tAcS1h4rTybD&qEFxve z--Td-(0TW5fhyo^g)`&52)(ZCg`!Msl|ALoIp5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ient.jpg images/titlebarLogo.png images/menuArrow.png + images/menuButtonGradient.png fonts/SFUIDisplay-Medium.otf fonts/SFUIDisplay-Regular.otf fonts/SFUIDisplay-Light.otf