Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderItemDelegate.qml
| Show First 20 Lines • Show All 336 Lines • ▼ Show 20 Line(s) | 285 | PlasmaComponents.Label { | |||
|---|---|---|---|---|---|
| 337 | 337 | | |||
| 338 | text: model.blank ? "" : model.display | 338 | text: model.blank ? "" : model.display | ||
| 339 | 339 | | |||
| 340 | font.italic: model.isLink | 340 | font.italic: model.isLink | ||
| 341 | 341 | | |||
| 342 | visible: editor.targetItem != main | 342 | visible: editor.targetItem != main | ||
| 343 | } | 343 | } | ||
| 344 | 344 | | |||
| 345 | Column { | | |||
| 346 | id: actions | | |||
| 347 | | ||||
| 348 | visible: { | | |||
| 349 | if (main.GridView.view.isRootView && root.containsDrag) { | | |||
| 350 | return false; | | |||
| 351 | } | | |||
| 352 | | ||||
| 353 | if (!main.GridView.view.isRootView && dialog.containsDrag) { | | |||
| 354 | return false; | | |||
| 355 | } | | |||
| 356 | | ||||
| 357 | if (popupDialog) { | | |||
| 358 | return false; | | |||
| 359 | } | | |||
| 360 | | ||||
| 361 | return true; | | |||
| 362 | } | | |||
| 363 | | ||||
| 364 | z: 3 | | |||
| 365 | | ||||
| 366 | states: [ | | |||
| 367 | State { // icon view | | |||
| 368 | when: !root.useListViewMode | | |||
| 369 | | ||||
| 370 | AnchorChanges { | | |||
| 371 | target: actions | | |||
| 372 | anchors.horizontalCenter: undefined | | |||
| 373 | anchors.verticalCenter: undefined | | |||
| 374 | anchors.left: parent.left | | |||
| 375 | anchors.top: parent.top | | |||
| 376 | } | | |||
| 377 | }, | | |||
| 378 | State { // list view | | |||
| 379 | when: root.useListViewMode | | |||
| 380 | | ||||
| 381 | AnchorChanges { | | |||
| 382 | target: actions | | |||
| 383 | anchors.horizontalCenter: icon.horizontalCenter | | |||
| 384 | anchors.verticalCenter: icon.verticalCenter | | |||
| 385 | anchors.left: undefined | | |||
| 386 | anchors.top: undefined | | |||
| 387 | } | | |||
| 388 | } | | |||
| 389 | ] | | |||
| 390 | | ||||
| 391 | width: implicitWidth | | |||
| 392 | height: implicitHeight | | |||
| 393 | } | | |||
| 394 | | ||||
| 395 | Component { | 345 | Component { | ||
| 396 | id: frameComponent | 346 | id: frameComponent | ||
| 397 | 347 | | |||
| 398 | PlasmaCore.FrameSvgItem { | 348 | PlasmaCore.FrameSvgItem { | ||
| 399 | prefix: frameLoader.prefix | 349 | prefix: frameLoader.prefix | ||
| 400 | 350 | | |||
| 401 | imagePath: "widgets/viewitem" | 351 | imagePath: "widgets/viewitem" | ||
| 402 | } | 352 | } | ||
| ▲ Show 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | 421 | State { | |||
| 475 | PropertyChanges { | 425 | PropertyChanges { | ||
| 476 | target: frameLoader | 426 | target: frameLoader | ||
| 477 | prefix: "selected+hover" | 427 | prefix: "selected+hover" | ||
| 478 | } | 428 | } | ||
| 479 | } | 429 | } | ||
| 480 | ] | 430 | ] | ||
| 481 | } | 431 | } | ||
| 482 | 432 | | |||
| 433 | Column { | ||||
| 434 | id: actions | ||||
| 435 | | ||||
| 436 | visible: { | ||||
| 437 | if (main.GridView.view.isRootView && root.containsDrag) { | ||||
| 438 | return false; | ||||
| 439 | } | ||||
| 440 | | ||||
| 441 | if (!main.GridView.view.isRootView && dialog.containsDrag) { | ||||
| 442 | return false; | ||||
| 443 | } | ||||
| 444 | | ||||
| 445 | if (popupDialog) { | ||||
| 446 | return false; | ||||
| 447 | } | ||||
| 448 | | ||||
| 449 | return true; | ||||
| 450 | } | ||||
| 451 | | ||||
| 452 | anchors { | ||||
| 453 | left: frameLoader.left | ||||
| 454 | top: frameLoader.top | ||||
| 455 | leftMargin: root.useListViewMode ? (icon.x + (icon.width / 2)) - (width / 2) : 0 | ||||
broulik: Can you verify this (`icon.x` in conjunction with auto-mirroring left anchor) works fine in RTL… | |||||
| 456 | topMargin: root.useListViewMode ? (icon.y + (icon.height / 2)) - (height / 2) : 0 | ||||
| 457 | } | ||||
| 458 | | ||||
| 459 | width: implicitWidth | ||||
broulik: Shouldn't be neccessary | |||||
| 460 | height: implicitHeight | ||||
| 461 | } | ||||
| 462 | | ||||
| 483 | Component.onCompleted: { | 463 | Component.onCompleted: { | ||
| 484 | if (root.isContainment && main.GridView.view.isRootView) { | 464 | if (root.isContainment && main.GridView.view.isRootView) { | ||
| 485 | frameLoader.textShadow = textShadowComponent.createObject(frameLoader); | 465 | frameLoader.textShadow = textShadowComponent.createObject(frameLoader); | ||
| 486 | } | 466 | } | ||
| 487 | } | 467 | } | ||
| 488 | } | 468 | } | ||
| 489 | } | 469 | } | ||
| 490 | } | 470 | } | ||
Can you verify this (icon.x in conjunction with auto-mirroring left anchor) works fine in RTL mode?