Changeset View
Changeset View
Standalone View
Standalone View
applets/pager/package/contents/ui/main.qml
Show First 20 Lines • Show All 290 Lines • ▼ Show 20 Line(s) | 223 | Grid { | |||
---|---|---|---|---|---|
291 | 291 | | |||
292 | Repeater { | 292 | Repeater { | ||
293 | id: repeater | 293 | id: repeater | ||
294 | model: pagerModel | 294 | model: pagerModel | ||
295 | 295 | | |||
296 | PlasmaCore.ToolTipArea { | 296 | PlasmaCore.ToolTipArea { | ||
297 | id: desktop | 297 | id: desktop | ||
298 | 298 | | |||
299 | property int desktopId: index | 299 | property int desktopId: isActivityPager ? model.TasksModel.activity : model.TasksModel.virtualDesktop | ||
300 | property bool active: (index == pagerModel.currentPage) | 300 | property bool active: (index == pagerModel.currentPage) | ||
301 | 301 | | |||
302 | mainText: model.display | 302 | mainText: model.display | ||
303 | // our ToolTip has maximumLineCount of 8 which doesn't fit but QML doesn't | 303 | // our ToolTip has maximumLineCount of 8 which doesn't fit but QML doesn't | ||
304 | // respect that in RichText so we effectively can put in as much as we like :) | 304 | // respect that in RichText so we effectively can put in as much as we like :) | ||
305 | // it also gives us more flexibility when it comes to styling the <li> | 305 | // it also gives us more flexibility when it comes to styling the <li> | ||
306 | textFormat: Text.RichText | 306 | textFormat: Text.RichText | ||
307 | 307 | | |||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Line(s) | 388 | onDrop: { | |||
391 | dragTimer.stop(); | 391 | dragTimer.stop(); | ||
392 | } | 392 | } | ||
393 | } | 393 | } | ||
394 | 394 | | |||
395 | MouseArea { | 395 | MouseArea { | ||
396 | id: desktopMouseArea | 396 | id: desktopMouseArea | ||
397 | anchors.fill: parent | 397 | anchors.fill: parent | ||
398 | hoverEnabled : true | 398 | hoverEnabled : true | ||
399 | onClicked: pagerModel.changePage(desktopId); | 399 | onClicked: pagerModel.changePage(index); | ||
400 | } | 400 | } | ||
401 | 401 | | |||
402 | Item { | 402 | Item { | ||
403 | id: clipRect | 403 | id: clipRect | ||
404 | x: Math.round(units.devicePixelRatio) | 404 | x: Math.round(units.devicePixelRatio) | ||
405 | y: Math.round(units.devicePixelRatio) | 405 | y: Math.round(units.devicePixelRatio) | ||
406 | width: desktop.width - 2 * x | 406 | width: desktop.width - 2 * x | ||
407 | height: desktop.height - 2 * y | 407 | height: desktop.height - 2 * y | ||
408 | 408 | | |||
409 | z: 1 // Between optional label item and FrameSvg | 409 | z: 1 // Between optional label item and FrameSvg | ||
410 | 410 | | |||
411 | Repeater { | 411 | Repeater { | ||
412 | id: windowRectRepeater | 412 | id: windowRectRepeater | ||
413 | 413 | | |||
414 | model: TasksModel | 414 | model: TasksModel | ||
415 | 415 | | |||
416 | onCountChanged: desktop.updateSubText() | 416 | onCountChanged: desktop.updateSubText() | ||
417 | 417 | | |||
418 | Rectangle { | 418 | Rectangle { | ||
419 | id: windowRect | 419 | id: windowRect | ||
420 | 420 | | |||
421 | z: 1 + model.StackingOrder | 421 | z: 1 + model.StackingOrder | ||
422 | 422 | | |||
423 | property rect geometry: model.Geometry | 423 | property rect geometry: model.Geometry | ||
424 | property int windowId: model.LegacyWinIdList[0] | 424 | property int windowId: model.WinIdList[0] | ||
425 | property string visibleName: model.display | 425 | property string visibleName: model.display | ||
426 | property bool minimized: (model.IsMinimized === true) | 426 | property bool minimized: (model.IsMinimized === true) | ||
427 | onMinimizedChanged: desktop.updateSubText() | 427 | onMinimizedChanged: desktop.updateSubText() | ||
428 | onVisibleNameChanged: desktop.updateSubText() | 428 | onVisibleNameChanged: desktop.updateSubText() | ||
429 | 429 | | |||
430 | /* since we move clipRect with 1, move it back */ | 430 | /* since we move clipRect with 1, move it back */ | ||
431 | x: (geometry.x * pagerItemGrid.widthScaleFactor) - Math.round(units.devicePixelRatio) | 431 | x: (geometry.x * pagerItemGrid.widthScaleFactor) - Math.round(units.devicePixelRatio) | ||
432 | y: (geometry.y * pagerItemGrid.heightScaleFactor) - Math.round(units.devicePixelRatio) | 432 | y: (geometry.y * pagerItemGrid.heightScaleFactor) - Math.round(units.devicePixelRatio) | ||
▲ Show 20 Lines • Show All 106 Lines • Show Last 20 Lines |