Skip to content
Snippets Groups Projects
Commit 3eee2bea authored by SeeLook's avatar SeeLook :musical_note:
Browse files

[Android] get rid of exam menu buttons bg color

- call close() of drawer from button click method (this is common entry
for all button instances)
- add scale animation when clicked
- disable label click when exam
parent e6152e9f
No related branches found
No related tags found
No related merge requests found
Pipeline #2650 passed
......@@ -80,7 +80,6 @@ TmobileMenu {
tempoMenu = tm.createObject(nootkaWindow.contentItem)
}
tempoMenu.open()
mainDrawer.close()
}
}
......@@ -114,6 +113,7 @@ TmobileMenu {
NootkaLabel {
id: nooLabel
height: Noo.fontSize() * 7.91015625 // (logo ratio) 0.3955078125 * 20
enabled: !GLOB.isExam
onClicked: {
mainDrawer.close()
Noo.aboutAct.trigger()
......@@ -125,11 +125,9 @@ TmobileMenu {
MenuButton {
action: modelData
visible: action && action.enabled
onClicked: mainDrawer.close()
color: Noo.alpha(containsPress ? activPal.highlight : (action ? action.bgColor : "transparent"), 50)
}
}
MenuButton { action: pitchDetectAct; onClicked: mainDrawer.close() }
MenuButton { action: pitchDetectAct }
MenuButton {
visible: !GLOB.singleNoteMode
action: tempoAct
......@@ -140,18 +138,17 @@ TmobileMenu {
text: beatModel[SOUND.beatUnit] + "=" + SOUND.tempo
}
}
MenuButton { action: Noo.examAct; onClicked: mainDrawer.close() }
MenuButton { action: Noo.levelAct; onClicked: mainDrawer.close() }
MenuButton { visible: !GLOB.singleNoteMode; action: Noo.scoreAct; onClicked: mainDrawer.close() }
MenuButton { action: Noo.examAct }
MenuButton { action: Noo.levelAct }
MenuButton { visible: !GLOB.singleNoteMode; action: Noo.scoreAct }
MenuButton {
action: Taction {
text: Noo.settingsAct.text
icon: GLOB.isExam ? "exam-settings" : "systemsettings"
onTriggered: Noo.settingsAct.trigger()
}
onClicked: mainDrawer.close()
}
MenuButton { action: tunerAct; onClicked: mainDrawer.close() }
MenuButton { action: tunerAct }
MenuButton { onClicked: nootkaWindow.close(); action: Taction { icon: "close"; text: Noo.TR("QShortcut", "Close") } }
}
}
......
......@@ -23,6 +23,10 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
color: ma.containsPress ? Noo.alpha(activPal.highlight, 50) : "transparent"
enabled: !action || action.enabled
scale: GLOB.useAnimations && ma.containsMouse ? 1.2 : 1
transformOrigin: Item.Left
Behavior on scale { enabled: GLOB.useAnimations; NumberAnimation { duration: 150 } }
signal clicked()
......@@ -65,20 +69,12 @@ Rectangle {
MouseArea {
id: ma
anchors.fill: parent
// hoverEnabled: true
onClicked: buttonClicked()
// onHoveredChanged: {
// if (action) {
// if (GLOB.showHints && action.tip !== "" && ma.containsMouse)
// Noo.setStatusTip(action.tip, action.tipPos)
// else
// Noo.setStatusTip("", action.tipPos)
// }
// }
}
function buttonClicked() {
menuButton.clicked()
mainDrawer.close()
if (action)
action.trigger()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment