diff --git a/chotkeys/main.cpp b/chotkeys/main.cpp index 62e84cf..f4ce134 100644 --- a/chotkeys/main.cpp +++ b/chotkeys/main.cpp @@ -17,13 +17,14 @@ * along with this program. If not, see . */ -#include +#include #include #include "application.h" int main(int argc, char *argv[]) { - QCoreApplication a(argc, argv); + QApplication a(argc, argv); + a.setQuitOnLastWindowClosed(true); if (!QDBusConnection::sessionBus().registerService("org.cutefish.Chotkeys")) { return -1; diff --git a/shutdown-ui/IconButton.qml b/shutdown-ui/IconButton.qml index 2ac6599..fa0093b 100644 --- a/shutdown-ui/IconButton.qml +++ b/shutdown-ui/IconButton.qml @@ -35,7 +35,7 @@ Item { Rectangle { anchors.fill: parent color: "white" - opacity: mouseArea.pressed || control.checked ? 0.1 : mouseArea.containsMouse ? 0.2 : 0 + opacity: mouseArea.pressed ? 0.1 : mouseArea.containsMouse || control.checked ? 0.2 : 0 radius: height / 2 Behavior on opacity { diff --git a/shutdown-ui/main.qml b/shutdown-ui/main.qml index 9973489..30686aa 100644 --- a/shutdown-ui/main.qml +++ b/shutdown-ui/main.qml @@ -24,6 +24,7 @@ import QtQuick.Layouts 1.3 import QtGraphicalEffects 1.0 import Cutefish.Accounts 1.0 as Accounts +import Cutefish.System 1.0 as System import FishUI 1.0 as FishUI ApplicationWindow { @@ -34,26 +35,45 @@ ApplicationWindow { flags: Qt.FramelessWindowHint | Qt.X11BypassWindowManagerHint id: root - color: "transparent" - function exit() { Qt.quit() } - background: Rectangle { - color: "black" - opacity: 0.7 + System.Wallpaper { + id: wallpaper } - Accounts.UserAccount { - id: currentUser + Image { + id: wallpaperImage + anchors.fill: parent + source: "file://" + wallpaper.path + sourceSize: Qt.size(width * Screen.devicePixelRatio, + height * Screen.devicePixelRatio) + fillMode: Image.PreserveAspectCrop + asynchronous: false + clip: true + cache: false + smooth: true + + ColorOverlay { + anchors.fill: parent + source: parent + color: "#000000" + opacity: 0.5 + } } - FishUI.WindowBlur { - view: root - geometry: Qt.rect(root.x, root.y, root.width, root.height) - windowRadius: 0 - enabled: true + FastBlur { + id: wallpaperBlur + anchors.fill: parent + radius: 64 + source: wallpaperImage + cached: true + visible: true + } + + Accounts.UserAccount { + id: currentUser } onActiveChanged: {