~vesar/+junk/DesktopTaskSwitcher-tryout

« back to all changes in this revision

Viewing changes to TaskSwitcher/SpreadDelegate.qml

  • Committer: vesa.rautiainen at canonical
  • Date: 2015-05-12 11:40:36 UTC
  • Revision ID: vesa.rautiainen@canonical.com-20150512114036-fpcuf7ss4kr4rws4
testing how to make middle section a bit more organic.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
    property bool lastItem: false // is this the rightmost item in the stack
18
18
    property real combinedSecondStageProgress: 0
19
19
 
 
20
    property real middleSectionProgress: 0
 
21
    property real middleSectionScale: 0
 
22
    property real middleSectionRotation: 0
 
23
 
20
24
    property real firstStackingProgress: 0
21
25
    property real firstEndStackingProgress: 0
22
26
    property real secondStackingProgress: 0
57
61
        height: contentHeight
58
62
        width: imageRatio < 1 && !scalingLimitExceeded ? minimumContainerWidth : root.width
59
63
 
60
 
        transform:[
61
 
            Rotation {origin.x: 0; origin.y: container.height/2; axis { x: 0; y: 1; z: 0 } angle: root.rotationAngle},
62
 
            Translate {
63
 
                x: stackingTranslation
64
 
            },
65
 
            // end stacking
66
 
            Translate {
67
 
                x: finalStackingTranslation + finalEndStackingTranslation
68
 
            },
 
64
        transform: [
69
65
            Rotation {
70
 
                origin.x: stackingTranslation + finalStackingTranslation + finalEndStackingTranslation;
 
66
                origin.x: 0
71
67
                origin.y: root.height/2;
72
68
                axis { x: 0; y: 1; z: 0 }
73
 
                angle: root.stackingRotation
 
69
                angle: root.rotationAngle + root.stackingRotation + middleSectionRotation
74
70
            },
75
71
            Scale {
76
 
                xScale: 1 + stackingScale
 
72
                xScale: 1 + stackingScale - middleSectionScale * 0.03
77
73
                yScale: xScale
78
 
                origin.x: stackingTranslation + finalStackingTranslation + finalEndStackingTranslation;
 
74
                origin.x: root.width/2
79
75
                origin.y: root.height/2;
 
76
            },
 
77
            Translate {
 
78
                x: stackingTranslation + finalStackingTranslation + finalEndStackingTranslation
80
79
            }
81
80
        ]
82
81