Fix hotkeys not quit

pull/9/head
reionwong 4 years ago
parent a932137cf7
commit 1103c69cae

@ -17,13 +17,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QCoreApplication>
#include <QApplication>
#include <QDBusConnection>
#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;

@ -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 {

@ -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: {

Loading…
Cancel
Save