Commit 92d3b613 authored by Marco Martin's avatar Marco Martin

support applets configuration dialog

needs a way to disable the button for those that
don't have a config dialog
parent 2ed4578a
......@@ -67,6 +67,7 @@ MouseEventListener {
editOverlay.visible = true;
var pos = mapToItem(appletsLayout, mouse.x, mouse.y);
draggingApplet = appletsSpace.layout.childAt(pos.x, pos.y);
editOverlay.applet = draggingApplet;
startMouseX = mouse.screenX;
startMouseY = mouse.screenY;
......
......@@ -32,6 +32,7 @@ Rectangle {
id: editOverlay
anchors.fill: parent
property Item applet
color: Qt.rgba(0, 0, 0, 0.8)
visible: false
onVisibleChanged: {
......@@ -61,6 +62,31 @@ Rectangle {
anchors.fill: parent
preventStealing: true
onClicked: editOverlay.opacity = 0;
Row {
visible: editOverlay.applet
anchors.horizontalCenter: parent.horizontalCenter
y: parent.mapFromItem(editOverlay.applet, 0, 0).y + units.gridUnit * 3
PlasmaComponents.ToolButton {
iconSource: "configure"
flat: false
onClicked: {
editOverlay.applet.applet.action("configure").trigger();
editOverlay.opacity = 0;
}
}
Item {
width: units.gridUnit * 10
height: 1
}
PlasmaComponents.ToolButton {
iconSource: "window-close"
flat: false
onClicked: {
editOverlay.applet.applet.action("remove").trigger();
editOverlay.opacity = 0;
}
}
}
}
PlasmaCore.FrameSvgItem {
id: background
......
......@@ -17,6 +17,7 @@
*/
import QtQuick 2.0
import QtGraphicalEffects 1.0
import QtQuick.Dialogs 1.1
import QtQuick.Controls 1.0 as QtControls
import QtQuick.Layouts 1.0
......@@ -42,11 +43,6 @@ Rectangle {
ConfigModel {
id: globalAppletConfigModel
ConfigCategory {
name: i18nd("plasma_shell_org.kde.plasma.desktop", "Keyboard shortcuts")
icon: "preferences-desktop-keyboard"
source: "ConfigurationShortcuts.qml"
}
}
//END model
......@@ -363,6 +359,34 @@ Rectangle {
shortcut: "Escape"
}
}
LinearGradient {
width: units.gridUnit/2
anchors {
right: parent.left
top: parent.top
bottom: parent.bottom
rightMargin: -1
}
start: Qt.point(0, 0)
end: Qt.point(units.gridUnit/2, 0)
gradient: Gradient {
GradientStop {
position: 0.0
color: "transparent"
}
GradientStop {
position: 0.7
color: Qt.rgba(0, 0, 0, 0.15)
}
GradientStop {
position: 1.0
color: Qt.rgba(0, 0, 0, 0.3)
}
}
MouseArea {
anchors.fill: parent
}
}
}
}
//END UI components
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment