Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/AppletAppearance.qml
Show First 20 Lines • Show All 599 Lines • ▼ Show 20 Line(s) | 453 | // print("Applet DESTROYED."); | |||
---|---|---|---|---|---|
600 | 600 | | |||
601 | Behavior on controlsOpacity { | 601 | Behavior on controlsOpacity { | ||
602 | NumberAnimation { | 602 | NumberAnimation { | ||
603 | duration: units.longDuration | 603 | duration: units.longDuration | ||
604 | easing.type: Easing.InOutQuad | 604 | easing.type: Easing.InOutQuad | ||
605 | } | 605 | } | ||
606 | } | 606 | } | ||
607 | 607 | | |||
608 | //sides | ||||
609 | ResizeHandle { | ||||
broulik: The handles should be hidden if widgets are locked, otherwise you get the cursors but cannot… | |||||
610 | anchors { | ||||
611 | left: parent.left | ||||
612 | top: parent.top | ||||
613 | right: parent.right | ||||
614 | leftMargin: units.gridUnit | ||||
615 | rightMargin: units.gridUnit | ||||
616 | } | ||||
617 | cursorShape: Qt.SizeVerCursor | ||||
618 | moveX: false | ||||
619 | moveY: true | ||||
620 | resizeWidth: false | ||||
621 | resizeHeight: true | ||||
622 | } | ||||
623 | ResizeHandle { | ||||
624 | anchors { | ||||
625 | left: parent.left | ||||
626 | bottom: parent.bottom | ||||
627 | right: parent.right | ||||
628 | leftMargin: units.gridUnit | ||||
629 | rightMargin: units.gridUnit | ||||
630 | } | ||||
631 | cursorShape: Qt.SizeVerCursor | ||||
632 | moveX: false | ||||
633 | moveY: false | ||||
634 | resizeWidth: false | ||||
635 | resizeHeight: true | ||||
636 | } | ||||
637 | ResizeHandle { | ||||
638 | anchors { | ||||
639 | left: parent.left | ||||
640 | top: parent.top | ||||
641 | bottom: parent.bottom | ||||
642 | topMargin: units.gridUnit | ||||
643 | bottomMargin: units.gridUnit | ||||
644 | } | ||||
645 | enabled: !parent.LayoutMirroring.enabled || !showAppletHandle | ||||
646 | cursorShape: Qt.SizeHorCursor | ||||
647 | moveX: true | ||||
648 | moveY: false | ||||
649 | resizeWidth: true | ||||
650 | resizeHeight: false | ||||
651 | } | ||||
652 | ResizeHandle { | ||||
653 | anchors { | ||||
654 | right: parent.right | ||||
655 | top: parent.top | ||||
656 | bottom: parent.bottom | ||||
657 | topMargin: units.gridUnit | ||||
658 | bottomMargin: units.gridUnit | ||||
659 | } | ||||
660 | enabled: parent.LayoutMirroring.enabled || !showAppletHandle | ||||
661 | cursorShape: Qt.SizeHorCursor | ||||
662 | moveX: false | ||||
663 | moveY: false | ||||
664 | resizeWidth: true | ||||
665 | resizeHeight: false | ||||
666 | } | ||||
667 | //corners | ||||
668 | ResizeHandle { | ||||
669 | anchors { | ||||
670 | left: parent.left | ||||
671 | top: parent.top | ||||
672 | } | ||||
673 | enabled: !parent.LayoutMirroring.enabled || !showAppletHandle | ||||
674 | cursorShape: Qt.SizeFDiagCursor | ||||
675 | moveX: true | ||||
676 | moveY: true | ||||
677 | resizeWidth: true | ||||
678 | resizeHeight: true | ||||
679 | } | ||||
680 | ResizeHandle { | ||||
681 | anchors { | ||||
682 | right: parent.right | ||||
683 | top: parent.top | ||||
684 | } | ||||
685 | enabled: parent.LayoutMirroring.enabled || !showAppletHandle | ||||
686 | cursorShape: Qt.SizeBDiagCursor | ||||
687 | moveX: false | ||||
688 | moveY: true | ||||
689 | resizeWidth: true | ||||
690 | resizeHeight: true | ||||
691 | } | ||||
692 | ResizeHandle { | ||||
693 | anchors { | ||||
694 | left: parent.left | ||||
695 | bottom: parent.bottom | ||||
696 | } | ||||
697 | enabled: !parent.LayoutMirroring.enabled || !showAppletHandle | ||||
698 | cursorShape: Qt.SizeBDiagCursor | ||||
699 | moveX: true | ||||
700 | moveY: false | ||||
701 | resizeWidth: true | ||||
702 | resizeHeight: true | ||||
703 | } | ||||
704 | ResizeHandle { | ||||
705 | anchors { | ||||
706 | right: parent.right | ||||
707 | bottom: parent.bottom | ||||
708 | } | ||||
709 | enabled: parent.LayoutMirroring.enabled || !showAppletHandle | ||||
710 | cursorShape: Qt.SizeFDiagCursor | ||||
711 | moveX: false | ||||
712 | moveY: false | ||||
713 | resizeWidth: true | ||||
714 | resizeHeight: true | ||||
715 | } | ||||
716 | | ||||
608 | Component.onCompleted: { | 717 | Component.onCompleted: { | ||
609 | floating = false; | 718 | floating = false; | ||
610 | layoutTimer.running = true | 719 | layoutTimer.running = true | ||
611 | layoutTimer.restart() | 720 | layoutTimer.restart() | ||
612 | visible = false | 721 | visible = false | ||
613 | } | 722 | } | ||
614 | } | 723 | } |
The handles should be hidden if widgets are locked, otherwise you get the cursors but cannot actually do anything.