~mterry/+junk/u8

« back to all changes in this revision

Viewing changes to qml/Launcher/LauncherPanel.qml

Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2013 Canonical, Ltd.
 
2
 * Copyright (C) 2013-2016 Canonical, Ltd.
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or modify
5
5
 * it under the terms of the GNU General Public License as published by
18
18
import Ubuntu.Components 1.3
19
19
import Unity.Launcher 0.1
20
20
import Ubuntu.Components.Popups 1.3
21
 
import "../Components/ListItems"
22
 
import "../Components/"
 
21
import "../Components"
23
22
 
24
23
Rectangle {
25
24
    id: root
69
68
    MouseArea {
70
69
        id: mouseEventEater
71
70
        anchors.fill: parent
 
71
        acceptedButtons: Qt.AllButtons
72
72
        hoverEnabled: true
 
73
        onWheel: wheel.accepted = true;
73
74
    }
74
75
 
75
76
    Column {
239
240
                        alerting: model.alerting
240
241
                        highlighted: root.highlightIndex == index
241
242
                        shortcutHintShown: root.shortcutHintsShown && index <= 9
 
243
                        surfaceCount: model.surfaceCount
242
244
                        z: -Math.abs(offset)
243
245
                        maxAngle: 55
244
246
                        property bool dragging: false
271
273
 
272
274
                            PropertyAction { target: launcherListViewItem; property: "clip"; value: 1 }
273
275
                            PropertyAction { target: root; property: "visible"; value: (launcher.visibleWidth === 0) ? 0 : 1 }
 
276
                            PropertyAction { target: launcherListView; property: "peekingIndex"; value: -1 }
274
277
                        }
275
278
 
276
279
                        onAlertingChanged: {
292
295
                            }
293
296
                        }
294
297
 
295
 
                        ThinDivider {
 
298
                        Image {
296
299
                            id: dropIndicator
297
300
                            objectName: "dropIndicator"
298
301
                            anchors.centerIn: parent
 
302
                            height: visible ? units.dp(2) : 0
299
303
                            width: parent.width + mainColumn.anchors.leftMargin + mainColumn.anchors.rightMargin
300
304
                            opacity: 0
301
305
                            source: "graphics/divider-line.png"
628
632
        }
629
633
    }
630
634
 
631
 
    UbuntuShapeForItem {
 
635
    UbuntuShape {
632
636
        id: quickListShape
633
637
        objectName: "quickListShape"
634
638
        anchors.fill: quickList
641
645
            UbuntuNumberAnimation {}
642
646
        }
643
647
 
644
 
        image: quickList
 
648
        source: ShaderEffectSource {
 
649
            sourceItem: quickList
 
650
            hideSource: true
 
651
        }
645
652
 
646
653
        Image {
647
654
            anchors {
754
761
        }
755
762
 
756
763
        // internal
757
 
        property int itemCenter: item ? root.mapFromItem(quickList.item).y + (item.height / 2) + quickList.item.offset : units.gu(1)
 
764
        property int itemCenter: item ? root.mapFromItem(quickList.item, 0, 0).y + (item.height / 2) + quickList.item.offset : units.gu(1)
758
765
        property int offset: itemCenter + (height/2) + units.gu(1) > parent.height ? -itemCenter - (height/2) - units.gu(1) + parent.height :
759
766
                             itemCenter - (height/2) < units.gu(1) ? (height/2) - itemCenter + units.gu(1) : 0
760
767