From 0ed42f0fca999622b9b6b8971855dab655fe4832 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 6 Nov 2025 15:00:54 +0200 Subject: Add quit button Add button in settings to quit the application. Useful when using launcher in fullscreen to get back into desktop. Quit icon from iconpacks.net, no license restrictions. Change-Id: I5afe35523068fddd579b456f106fb4a864f55cc6 Reviewed-by: Ari Parkkila --- QtLauncher/CMakeLists.txt | 1 + QtLauncher/Header.qml | 15 +++++++++++++++ QtLauncher/icons/quit_icon.svg | 7 +++++++ 3 files changed, 23 insertions(+) create mode 100644 QtLauncher/icons/quit_icon.svg diff --git a/QtLauncher/CMakeLists.txt b/QtLauncher/CMakeLists.txt index a2f4871..a97aa75 100644 --- a/QtLauncher/CMakeLists.txt +++ b/QtLauncher/CMakeLists.txt @@ -52,6 +52,7 @@ set(icons "icons/settings_icon.svg" "icons/grid_icon.svg" "icons/touch_icon.svg" + "icons/quit_icon.svg" ) add_subdirectory(QtImageProviders) diff --git a/QtLauncher/Header.qml b/QtLauncher/Header.qml index 64150df..adea718 100644 --- a/QtLauncher/Header.qml +++ b/QtLauncher/Header.qml @@ -143,6 +143,21 @@ Item { height: parent.height color: "white" } + + SettingsButton { + id: quit + source: "icons/quit_icon.svg" + + onClicked: { + Qt.quit() + } + } + + Rectangle { + width: 2 + height: parent.height + color: "white" + } } } diff --git a/QtLauncher/icons/quit_icon.svg b/QtLauncher/icons/quit_icon.svg new file mode 100644 index 0000000..968cc18 --- /dev/null +++ b/QtLauncher/icons/quit_icon.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file -- cgit v1.2.3