on xenial help sign in
TabletStage: Use Binding instead of JS settings a binding
commit8393c49c561449f2a4c25fb09a94114f6f9e7406 authorGerry Boland <gerry.boland@canonical.com> dateWed 10 Sep 2014, 17:01 (12 years ago) parent69190a1
1 file changed+7−8
qml/Stages/TabletStage.qml+7−8
qml/Stages/TabletStage.qml+7−8
@@ -536,6 +536,13 @@ Rectangle {
536536 return progress;
537537 }
538538
539+ Binding {
540+ target: appDelegate
541+ property: "orientation"
542+ when: appDelegate.interactive
543+ value: root.orientation
544+ }
545+
539546 onClicked: {
540547 if (spreadView.phase == 2) {
541548 spreadView.snapTo(index);
@@ -555,14 +562,6 @@ Rectangle {
555562 ApplicationManager.stopApplication(ApplicationManager.get(index).appId);
556563 }
557564
558− onInteractiveChanged: {
559− if (interactive) {
560− appDelegate.orientation = Qt.binding( function() { return root.orientation; } );
561− } else {
562− appDelegate.orientation = root.orientation; // breaks the binding intentionally
563− }
564− }
565−
566565 EasingCurve {
567566 id: snappingCurve
568567 type: EasingCurve.Linear