Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Mobile
Commits
92d3b613
Commit
92d3b613
authored
Sep 25, 2015
by
Marco Martin
Browse files
support applets configuration dialog
needs a way to disable the button for those that don't have a config dialog
parent
2ed4578a
Changes
3
Hide whitespace changes
Inline
Side-by-side
containments/homescreen/package/contents/ui/AppletsArea.qml
View file @
92d3b613
...
...
@@ -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
;
...
...
containments/homescreen/package/contents/ui/EditOverlay.qml
View file @
92d3b613
...
...
@@ -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
...
...
shell/contents/configuration/AppletConfiguration.qml
View file @
92d3b613
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment