~elopio/unity8/fix1335548-click_scope_item

« back to all changes in this revision

Viewing changes to qml/Launcher/LauncherPanel.qml

  • Committer: Leo Arias
  • Date: 2014-07-10 14:13:39 UTC
  • mfrom: (973.1.63 unity8)
  • Revision ID: leo.arias@canonical.com-20140710141339-hep6nmh2jdqq9pa3
Merged with trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import "../Components/ListItems"
23
23
import "../Components/"
24
24
 
25
 
Item {
 
25
Rectangle {
26
26
    id: root
 
27
    color: "#B2000000"
27
28
 
28
29
    rotation: inverted ? 180 : 0
29
30
 
37
38
    signal applicationSelected(string appId)
38
39
    signal showDashHome()
39
40
 
40
 
    BorderImage {
41
 
        id: background
42
 
        source: "graphics/launcher_bg.sci"
43
 
        anchors.fill: parent
44
 
        anchors.rightMargin: root.inverted ? 0 : -units.gu(1)
45
 
        anchors.leftMargin: root.inverted ? -units.gu(1) : 0
46
 
        rotation: root.rotation
47
 
    }
48
 
 
49
41
    Column {
50
42
        id: mainColumn
51
43
        anchors {
52
44
            fill: parent
53
45
        }
54
46
 
55
 
        MouseArea {
56
 
            id: dashItem
 
47
        Rectangle {
57
48
            width: parent.width
58
49
            height: units.gu(7)
59
 
            onClicked: root.showDashHome()
 
50
            color: UbuntuColors.orange
60
51
            z: 1
 
52
 
61
53
            Image {
62
54
                objectName: "dashItem"
63
55
                width: units.gu(5)
66
58
                source: "graphics/home.png"
67
59
                rotation: root.rotation
68
60
            }
 
61
            MouseArea {
 
62
                id: dashItem
 
63
                anchors.fill: parent
 
64
                onClicked: root.showDashHome()
 
65
            }
69
66
        }
 
67
 
70
68
        ThinDivider {
71
69
            anchors {
72
70
                left: parent.left
155
153
                        iconName: model.icon
156
154
                        count: model.count
157
155
                        progress: model.progress
 
156
                        clipCorner: model.pinned
158
157
                        itemFocused: model.focused
159
158
                        inverted: root.inverted
160
159
                        z: -Math.abs(offset)
167
166
                            anchors.centerIn: parent
168
167
                            width: parent.width + mainColumn.anchors.leftMargin + mainColumn.anchors.rightMargin
169
168
                            opacity: 0
 
169
                            source: "graphics/divider-line.png"
170
170
                        }
171
171
 
172
172
                        states: [
246
246
                            Transition {
247
247
                                from: "dragging"
248
248
                                to: "*"
249
 
                                NumberAnimation { target: dropIndicator; properties: "opacity"; duration: UbuntuAnimation.FastDuration }
 
249
                                NumberAnimation { target: dropIndicator; properties: "opacity"; duration: UbuntuAnimation.SnapDuration }
250
250
                                NumberAnimation { properties: "itemOpacity"; duration: UbuntuAnimation.BriskDuration }
251
251
                                SequentialAnimation {
252
252
                                    ScriptAction { script: if (index == launcherListView.count-1) launcherListView.flick(0, -launcherListView.clickFlickSpeed); }
464
464
                width: itemWidth
465
465
                rotation: root.rotation
466
466
                itemOpacity: 0.9
 
467
                clipCorner: dndArea.draggedIndex > -1 &&
 
468
                            LauncherModel.get(dndArea.draggedIndex).pinned &&
 
469
                            !dndArea.preDragging &&
 
470
                            !dndArea.dragging
467
471
 
468
472
                function flatten() {
469
473
                    fakeDragItemAnimation.start();
522
526
        color: "#221e1c"
523
527
        width: units.gu(30)
524
528
        height: quickListColumn.height
 
529
        visible: quickListShape.visible
525
530
        anchors {
526
531
            left: root.inverted ? undefined : parent.right
527
532
            right: root.inverted ? parent.left : undefined
528
533
            margins: units.gu(1)
529
 
 
530
534
        }
531
535
        y: itemCenter - (height / 2) + offset
532
536
        rotation: root.rotation