mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-29 15:03:09 +00:00
close and home buttons fixed
This commit is contained in:
parent
0860194325
commit
1f8f890757
4 changed files with 15 additions and 3 deletions
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
workspace.slotToggleShowDesktop();
|
||||||
|
|
@ -24,12 +24,22 @@ import org.kde.plasma.core 2.0 as PlasmaCore
|
||||||
import org.kde.plasma.components 2.0 as PlasmaComponents
|
import org.kde.plasma.components 2.0 as PlasmaComponents
|
||||||
import org.kde.kquickcontrolsaddons 2.0
|
import org.kde.kquickcontrolsaddons 2.0
|
||||||
|
|
||||||
Item {
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
//TODO: decide what color we want applets
|
||||||
|
color: theme.backgroundColor
|
||||||
|
|
||||||
width: 600
|
width: 600
|
||||||
height: 40
|
height: 40
|
||||||
|
|
||||||
property Item toolBox
|
property Item toolBox
|
||||||
|
|
||||||
|
PlasmaComponents.ToolButton {
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
iconSource: "go-home"
|
||||||
|
onClicked: plasmoid.nativeInterface.executeScript("showdesktop");
|
||||||
|
}
|
||||||
|
|
||||||
PlasmaComponents.ToolButton {
|
PlasmaComponents.ToolButton {
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
iconSource: "window-close"
|
iconSource: "window-close"
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,10 @@ TaskPanel::~TaskPanel()
|
||||||
void TaskPanel::executeScript(const QString &script)
|
void TaskPanel::executeScript(const QString &script)
|
||||||
{
|
{
|
||||||
//Plasma::Package p =
|
//Plasma::Package p =
|
||||||
package().filePath("scripts", script + ".js");
|
qWarning()<<"AAAAAA"<<package().filePath("scripts", script + ".js")<<package().path();
|
||||||
QDBusMessage message = QDBusMessage::createMethodCall(s_kwinService, "/Scripting", QString(), "loadScript");
|
QDBusMessage message = QDBusMessage::createMethodCall(s_kwinService, "/Scripting", QString(), "loadScript");
|
||||||
QList<QVariant> arguments;
|
QList<QVariant> arguments;
|
||||||
arguments << QVariant("/opt/kde5qt5/share/plasma/plasmoids/org.kde.phone.taskpanel/code/close.js");
|
arguments << QVariant(package().filePath("scripts", script + ".js"));
|
||||||
message.setArguments(arguments);
|
message.setArguments(arguments);
|
||||||
QDBusMessage reply = QDBusConnection::sessionBus().call(message);
|
QDBusMessage reply = QDBusConnection::sessionBus().call(message);
|
||||||
if (reply.type() == QDBusMessage::ErrorMessage) {
|
if (reply.type() == QDBusMessage::ErrorMessage) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue