Make polkit dialog movable

pull/15/head
reionwong 4 years ago
parent 34f87f164a
commit 9214b478ca

@ -139,13 +139,14 @@ Window {
Rectangle {
property color hoveredColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 2)
: Qt.darker(FishUI.Theme.backgroundColor, 1.2)
: Qt.darker(FishUI.Theme.backgroundColor, 1.2)
property color pressedColor: FishUI.Theme.darkMode ? Qt.lighter(FishUI.Theme.backgroundColor, 1.5)
: Qt.darker(FishUI.Theme.backgroundColor, 1.3)
: Qt.darker(FishUI.Theme.backgroundColor, 1.3)
z: -1
anchors.fill: parent
color: _closeBtnArea.pressed ? pressedColor : _closeBtnArea.containsMouse ? hoveredColor : "transparent"
color: "transparent"
// color: _closeBtnArea.pressed ? pressedColor : _closeBtnArea.containsMouse ? hoveredColor : "transparent"
radius: height / 2
}
@ -153,6 +154,7 @@ Window {
id: _closeBtnArea
anchors.fill: parent
hoverEnabled: true
onEntered: timer.stop()
onClicked: {
notificationsModel.close(model.notificationId)
}

@ -80,6 +80,9 @@ Item {
popup.y = y
y += popup.height + (popup.height > 0 ? popupSpacing : 0)
// Horizontal
popup.x = screenRect.x + (screenRect.width - popup.width) / 2
// don't let notifications take more than popupMaximumScreenFill of the screen
var visible = true
if (i > 0) { // however always show at least one popup

@ -16,6 +16,17 @@ Item {
color: FishUI.Theme.secondBackgroundColor
}
DragHandler {
target: null
acceptedDevices: PointerDevice.GenericPointer
grabPermissions: TapHandler.CanTakeOverFromAnything
onActiveChanged: if (active) { windowHelper.startSystemMove(rootWindow) }
}
FishUI.WindowHelper {
id: windowHelper
}
FishUI.WindowShadow {
view: rootWindow
geometry: Qt.rect(root.x, root.y, root.width, root.height)

@ -22,7 +22,7 @@
int main(int argc, char *argv[])
{
putenv((char *)"SESSION_MANAGER=");
// putenv((char *)"SESSION_MANAGER=");
// force xcb QPA plugin as session manager server is very X11 specific.
qputenv("QT_QPA_PLATFORM", QByteArrayLiteral("xcb"));

@ -75,26 +75,13 @@ void ProcessManager::logout()
QDBusConnection::sessionBus());
if (kwinIface.isValid()) {
// kwinIface.call("aboutToSaveSession", "cutefish");
kwinIface.call("aboutToSaveSession", "cutefish");
kwinIface.call("setState", uint(2)); // Quit
}
QMapIterator<QString, QProcess *> i(m_systemProcess);
while (i.hasNext()) {
i.next();
QProcess *p = i.value();
p->terminate();
}
i.toFront();
while (i.hasNext()) {
i.next();
QProcess *p = i.value();
if (p->state() != QProcess::NotRunning && !p->waitForFinished(2000)) {
p->kill();
}
}
QProcess s;
s.start("killall", QStringList() << "kglobalaccel5");
s.waitForFinished(-1);
QDBusInterface iface("org.freedesktop.login1",
"/org/freedesktop/login1/session/self",

Loading…
Cancel
Save