mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
Having a global set margins and orientation (that were calculated from the panel containment) caused a lot of issues with the way bindings were evaluated across panels, and with high coupling. Now use properties from within containments to determine shell margins instead, which removes the dependency on other containments for measurements. This allows us to get rid of TaskPanelControls as well! Fixes: https://invent.kde.org/teams/plasma-mobile/issues/-/issues/198
57 lines
1.5 KiB
QML
57 lines
1.5 KiB
QML
// SPDX-FileCopyrightText: 2022 Devin Lin <devin@kde.org>
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
import QtQuick 2.15
|
|
import QtQuick.Window 2.15
|
|
|
|
pragma Singleton
|
|
|
|
/**
|
|
* Provides access to common functions within the shell. Only available within the plasmashell process.
|
|
*/
|
|
QtObject {
|
|
id: delegate
|
|
|
|
/**
|
|
* Whether the task switcher is open.
|
|
*/
|
|
readonly property bool taskSwitcherVisible: HomeScreenControls.taskSwitcherVisible
|
|
|
|
/**
|
|
* Whether the homescreen is currently visible.
|
|
*/
|
|
readonly property bool homeScreenVisible: HomeScreenControls.homeScreenVisible
|
|
|
|
/**
|
|
* Whether the action drawer is currently open.
|
|
*/
|
|
readonly property bool actionDrawerVisible: TopPanelControls.actionDrawerVisible
|
|
|
|
/**
|
|
* Open the app launch screen with animation parameters.
|
|
*/
|
|
function openAppLaunchAnimation(splashIcon: string, title: string, x: real, y: real, sourceIconSize: real) {
|
|
HomeScreenControls.openAppLaunchAnimation(splashIcon, title, x, y, sourceIconSize);
|
|
}
|
|
|
|
/**
|
|
* Close the app launch screen.
|
|
*/
|
|
function closeAppLaunchAnimation() {
|
|
HomeScreenControls.closeAppLaunchAnimation();
|
|
}
|
|
|
|
/**
|
|
* Open the action drawer.
|
|
*/
|
|
function openActionDrawer() {
|
|
TopPanelControls.openActionDrawer();
|
|
}
|
|
|
|
/**
|
|
* Close the action drawer, if it is open.
|
|
*/
|
|
function closeActionDrawer() {
|
|
TopPanelControls.closeActionDrawer();
|
|
}
|
|
}
|