Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/main.qml
Show First 20 Lines • Show All 233 Lines • ▼ Show 20 Line(s) | 225 | onDrop: { | |||
---|---|---|---|---|---|
234 | } | 234 | } | ||
235 | } | 235 | } | ||
236 | 236 | | |||
237 | Component { | 237 | Component { | ||
238 | id: compactRepresentation | 238 | id: compactRepresentation | ||
239 | CompactRepresentation { folderView: folderViewLayer.view } | 239 | CompactRepresentation { folderView: folderViewLayer.view } | ||
240 | } | 240 | } | ||
241 | 241 | | |||
242 | Connections { | | |||
243 | target: plasmoid | | |||
244 | | ||||
245 | ignoreUnknownSignals: true | | |||
246 | | ||||
247 | | ||||
248 | onImmutableChanged: { | | |||
249 | if (root.isContainment && !plasmoid.immutable) { | | |||
250 | pressToMoveHelp.show(); | | |||
251 | } | | |||
252 | } | | |||
253 | } | | |||
254 | | ||||
255 | Connections { | | |||
256 | target: plasmoid.configuration | | |||
257 | | ||||
258 | onPressToMoveChanged: { | | |||
259 | if (plasmoid.configuration.pressToMove && plasmoid.configuration.pressToMoveHelp && !plasmoid.immutable) { | | |||
260 | pressToMoveHelp.show(); | | |||
261 | } | | |||
262 | } | | |||
263 | } | | |||
264 | | ||||
265 | Binding { | | |||
266 | target: toolBox | | |||
267 | property: "visible" | | |||
268 | value: plasmoid.configuration.showToolbox | | |||
broulik: A conf update isn't needed as it's this code hiding the toolbox when disabled, so without it it… | |||||
ngraham: Ah of course! | |||||
269 | } | | |||
270 | | ||||
271 | Desktop.InfoNotification { | | |||
272 | id: pressToMoveHelp | | |||
273 | | ||||
274 | enabled: plasmoid.configuration.pressToMove && plasmoid.configuration.pressToMoveHelp | | |||
275 | | ||||
276 | iconName: "plasma" | | |||
277 | titleText: i18n("Widgets unlocked") | | |||
278 | text: i18n("You can press and hold widgets to move them and reveal their handles.") | | |||
279 | acknowledgeActionText: i18n("Got it") | | |||
280 | | ||||
281 | onAcknowledged: { | | |||
282 | plasmoid.configuration.pressToMoveHelp = false; | | |||
283 | } | | |||
284 | } | | |||
285 | | ||||
286 | PlasmaCore.FrameSvgItem { | 242 | PlasmaCore.FrameSvgItem { | ||
287 | id : highlightItemSvg | 243 | id : highlightItemSvg | ||
288 | 244 | | |||
289 | visible: false | 245 | visible: false | ||
290 | 246 | | |||
291 | imagePath: isPopup ? "widgets/viewitem" : "" | 247 | imagePath: isPopup ? "widgets/viewitem" : "" | ||
292 | prefix: "hover" | 248 | prefix: "hover" | ||
293 | } | 249 | } | ||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | 280 | ContainmentLayoutManager.AppletsLayout { | |||
341 | cellHeight: cellWidth | 297 | cellHeight: cellWidth | ||
342 | 298 | | |||
343 | eventManagerToFilter: folderViewLayer.item ? folderViewLayer.item.view.view : null | 299 | eventManagerToFilter: folderViewLayer.item ? folderViewLayer.item.view.view : null | ||
344 | 300 | | |||
345 | appletContainerComponent: ContainmentLayoutManager.BasicAppletContainer { | 301 | appletContainerComponent: ContainmentLayoutManager.BasicAppletContainer { | ||
346 | id: appletContainer | 302 | id: appletContainer | ||
347 | editModeCondition: plasmoid.immutable | 303 | editModeCondition: plasmoid.immutable | ||
348 | ? ContainmentLayoutManager.ItemContainer.Locked | 304 | ? ContainmentLayoutManager.ItemContainer.Locked | ||
349 | : (plasmoid.configuration.pressToMove ? ContainmentLayoutManager.ItemContainer.AfterPressAndHold : ContainmentLayoutManager.ItemContainer.AfterMouseOver) | 305 | : ContainmentLayoutManager.ItemContainer.AfterPressAndHold | ||
350 | configOverlayComponent: ConfigOverlay {} | 306 | configOverlayComponent: ConfigOverlay {} | ||
351 | onUserDrag: { | 307 | onUserDrag: { | ||
352 | var pos = mapToItem(root.parent, dragCenter.x, dragCenter.y); | 308 | var pos = mapToItem(root.parent, dragCenter.x, dragCenter.y); | ||
353 | var newCont = plasmoid.containmentAt(pos.x, pos.y); | 309 | var newCont = plasmoid.containmentAt(pos.x, pos.y); | ||
354 | 310 | | |||
355 | if (newCont && newCont !== plasmoid) { | 311 | if (newCont && newCont !== plasmoid) { | ||
356 | var newPos = newCont.mapFromApplet(plasmoid, pos.x, pos.y); | 312 | var newPos = newCont.mapFromApplet(plasmoid, pos.x, pos.y); | ||
357 | 313 | | |||
▲ Show 20 Lines • Show All 57 Lines • Show Last 20 Lines |
A conf update isn't needed as it's this code hiding the toolbox when disabled, so without it it will just always show