Polish the resume/quit buttons

This commit is contained in:
Cameron Gutman
2019-02-12 19:07:48 -08:00
parent 6ed512e762
commit 23f1060756
+33 -17
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
implicitWidth: 125
implicitHeight: 125
Image {
source: "qrc:/res/baseline-play_circle_filled_white-48px.svg" source: "qrc:/res/baseline-play_circle_filled_white-48px.svg"
anchors.centerIn: parent
sourceSize { sourceSize {
width: 75 width: 75
height: 75 height: 75
} }
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton
onClicked: {
launchOrResumeSelectedApp()
}
}
} }
Image { onClicked: {
id: quitIcon launchOrResumeSelectedApp()
anchors.verticalCenterOffset: 45 }
ToolTip.text: "Resume Game"
ToolTip.delay: 1000
ToolTip.timeout: 3000
ToolTip.visible: hovered
}
ToolButton {
id: quitButton
anchors.verticalCenterOffset: 50
anchors.centerIn: appIcon anchors.centerIn: appIcon
visible: model.running visible: model.running
implicitWidth: 125
implicitHeight: 125
Image {
source: "qrc:/res/baseline-cancel-24px.svg" source: "qrc:/res/baseline-cancel-24px.svg"
anchors.centerIn: parent
sourceSize { sourceSize {
width: 75 width: 75
height: 75 height: 75
} }
MouseArea { }
anchors.fill: parent
acceptedButtons: Qt.LeftButton
onClicked: { onClicked: {
doQuitGame() doQuitGame()
} }
}
ToolTip.text: "Quit Game"
ToolTip.delay: 1000
ToolTip.timeout: 3000
ToolTip.visible: hovered
} }
Label { Label {