aboutsummaryrefslogtreecommitdiff
path: root/components/MenuButton.qml
diff options
context:
space:
mode:
Diffstat (limited to 'components/MenuButton.qml')
-rw-r--r--components/MenuButton.qml30
1 files changed, 6 insertions, 24 deletions
diff --git a/components/MenuButton.qml b/components/MenuButton.qml
index 93fc3b9f..a7edfff4 100644
--- a/components/MenuButton.qml
+++ b/components/MenuButton.qml
@@ -36,7 +36,6 @@ Rectangle {
id: button
property alias text: label.text
property bool checked: false
- property alias dotColor: dot.color
property alias symbol: symbolText.text
property int numSelectedChildren: 0
property var under: null
@@ -63,7 +62,7 @@ Rectangle {
height: present ? ((appWindow.height >= 800) ? 44 : 38 ) : 0
LinearGradient {
- visible: isOpenGL && button.checked
+ visible: isOpenGL && button.checked || numSelectedChildren > 0
height: parent.height
width: 260
anchors.verticalCenter: parent.verticalCenter
@@ -88,27 +87,10 @@ Rectangle {
// button decorations that are subject to leftMargin offsets
Rectangle {
anchors.left: parent.left
- anchors.leftMargin: parent.getOffset() + 20
+ anchors.leftMargin: 20
height: parent.height
- width: button.checked ? 20: 10
- color: "transparent"
-
- // dot if unchecked
- Rectangle {
- id: dot
- anchors.centerIn: parent
- width: button.checked ? 20 : 8
- height: button.checked ? 20 : 8
- radius: button.checked ? 20 : 4
- color: button.dotColor
- // arrow if checked
- Image {
- anchors.centerIn: parent
- anchors.left: parent.left
- source: MoneroComponents.Style.menuButtonImageDotArrowSource
- visible: button.checked
- }
- }
+ width: 2
+ color: button.checked ? MoneroComponents.Style.buttonBackgroundColor : "transparent"
// button text
MoneroComponents.TextPlain {
@@ -118,7 +100,7 @@ Rectangle {
themeTransitionWhiteColor: MoneroComponents.Style._w_menuButtonTextColor
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.right
- anchors.leftMargin: 8
+ anchors.leftMargin: button.getOffset() + 8
font.bold: true
font.pixelSize: 14
}
@@ -144,7 +126,7 @@ Rectangle {
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: 12
font.bold: true
- color: button.checked || buttonArea.containsMouse ? MoneroComponents.Style.menuButtonTextColor : dot.color
+ color: MoneroComponents.Style.menuButtonTextColor
visible: appWindow.ctrlPressed
themeTransition: false
}