/usr/share/plasma/shells/org.kde.plasma.plasmoidviewershell/contents/configuration/PanelConfiguration.qml is in plasma-sdk 5.8.6-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | /*
* Copyright 2013 Marco Martin <mart@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 2.010-1301, USA.
*/
import QtQuick 2.0
import org.kde.plasma.components 2.0 as PlasmaComponents
import org.kde.plasma.extras 2.0 as PlasmaExtras
import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.plasma.configuration 2.0
import org.kde.kquickcontrolsaddons 2.0 as KQuickControlsAddons
import "panelconfiguration"
//TODO: all of this will be done with desktop components
PlasmaCore.FrameSvgItem {
id: dialogRoot
signal closeContextMenu
//BEGIN Properties
width: 640
height: 64
imagePath: "dialogs/background"
state: {
switch (panel.location) {
case PlasmaCore.Types.TopEdge:
return "TopEdge"
case PlasmaCore.Types.LeftEdge:
return "LeftEdge"
case PlasmaCore.Types.RightEdge:
return "RightEdge"
case PlasmaCore.Types.BottomEdge:
default:
return "BottomEdge"
}
}
property bool vertical: (panel.location == PlasmaCore.Types.LeftEdge || panel.location == PlasmaCore.Types.RightEdge)
//END properties
//BEGIN Connections
Connections {
target: panel
onOffsetChanged: ruler.offset = panel.offset
onMinimumLengthChanged: ruler.minimumLength = panel.minimumLength
onMaximumLengthChanged: ruler.maximumLength = panel.maximumLength
}
Connections {
target: plasmoid
onImmutableChanged: configDialog.close()
}
//END Connections
//BEGIN UI components
Ruler {
id: ruler
state: dialogRoot.state
}
ToolBar {
id: toolBar
}
//END UI components
//BEGIN Animations
//when EdgeHandle is released animate to old panel position
ParallelAnimation {
id: panelResetAnimation
NumberAnimation {
target: panel
properties: (panel.location == PlasmaCore.Types.LeftEdge || panel.location == PlasmaCore.Types.RightEdge) ? "x" : "y"
to: {
switch (panel.location) {
case PlasmaCore.Types.TopEdge:
return panel.screenGeometry.y + panel.distance
case PlasmaCore.Types.LeftEdge:
return panel.screenGeometry.x + panel.distance
case PlasmaCore.Types.RightEdge:
return panel.screenGeometry.x + panel.screenGeometry.width - panel.width - panel.distance
case PlasmaCore.Types.BottomEdge:
default:
return panel.screenGeometry.y + panel.screenGeometry.height - panel.height - panel.distance
}
}
duration: units.shortDuration * 3
}
NumberAnimation {
target: configDialog
properties: (panel.location == PlasmaCore.Types.LeftEdge || panel.location == PlasmaCore.Types.RightEdge) ? "x" : "y"
to: {
switch (panel.location) {
case PlasmaCore.Types.TopEdge:
return panel.screenGeometry.y + panel.height + panel.distance
case PlasmaCore.Types.LeftEdge:
return panel.screenGeometry.x + panel.width + panel.distance
case PlasmaCore.Types.RightEdge:
return panel.screenGeometry.x + panel.screenGeometry.width - panel.width - configDialog.width - panel.distance
case PlasmaCore.Types.BottomEdge:
default:
return panel.screenGeometry.y + panel.screenGeometry.height - panel.height - configDialog.height - panel.distance
}
}
duration: units.shortDuration * 3
}
}
//END Animations
//BEGIN States
states: [
State {
name: "TopEdge"
PropertyChanges {
target: dialogRoot
enabledBorders: "TopBorder|BottomBorder"
}
PropertyChanges {
target: dialogRoot
implicitHeight: ruler.implicitHeight + toolBar.implicitHeight
}
},
State {
name: "BottomEdge"
PropertyChanges {
target: dialogRoot
enabledBorders: "TopBorder|BottomBorder"
}
PropertyChanges {
target: dialogRoot
implicitHeight: ruler.implicitHeight + toolBar.implicitHeight
}
},
State {
name: "LeftEdge"
PropertyChanges {
target: dialogRoot
enabledBorders: "LeftBorder|RightBorder"
}
PropertyChanges {
target: dialogRoot
implicitWidth: ruler.implicitWidth + toolBar.implicitWidth
}
},
State {
name: "RightEdge"
PropertyChanges {
target: dialogRoot
enabledBorders: "LeftBorder|RightBorder"
}
PropertyChanges {
target: dialogRoot
implicitWidth: ruler.implicitWidth + toolBar.implicitWidth
}
}
]
//END States
}
|