Polish the resume/quit buttons

This commit is contained in:
Cameron Gutman
2019-02-12 19:07:48 -08:00
parent 6ed512e762
commit 23f1060756
+42 -26
View File
@@ -78,42 +78,58 @@ GridView {
fillMode: Image.Pad fillMode: Image.Pad
} }
Image { ToolButton {
id: runningIcon id: resumeButton
anchors.verticalCenterOffset: -45 anchors.verticalCenterOffset: -50
anchors.centerIn: appIcon anchors.centerIn: appIcon
visible: model.running visible: model.running
source: "qrc:/res/baseline-play_circle_filled_white-48px.svg" implicitWidth: 125
sourceSize { implicitHeight: 125
width: 75
height: 75 Image {
} source: "qrc:/res/baseline-play_circle_filled_white-48px.svg"
MouseArea { anchors.centerIn: parent
anchors.fill: parent sourceSize {
acceptedButtons: Qt.LeftButton width: 75
onClicked: { height: 75
launchOrResumeSelectedApp()
} }
} }
onClicked: {
launchOrResumeSelectedApp()
}
ToolTip.text: "Resume Game"
ToolTip.delay: 1000
ToolTip.timeout: 3000
ToolTip.visible: hovered
} }
Image { ToolButton {
id: quitIcon id: quitButton
anchors.verticalCenterOffset: 45 anchors.verticalCenterOffset: 50
anchors.centerIn: appIcon anchors.centerIn: appIcon
visible: model.running visible: model.running
source: "qrc:/res/baseline-cancel-24px.svg" implicitWidth: 125
sourceSize { implicitHeight: 125
width: 75
height: 75 Image {
} source: "qrc:/res/baseline-cancel-24px.svg"
MouseArea { anchors.centerIn: parent
anchors.fill: parent sourceSize {
acceptedButtons: Qt.LeftButton width: 75
onClicked: { height: 75
doQuitGame()
} }
} }
onClicked: {
doQuitGame()
}
ToolTip.text: "Quit Game"
ToolTip.delay: 1000
ToolTip.timeout: 3000
ToolTip.visible: hovered
} }
Label { Label {