~mzanetti/unity8/hide-settings-count-emblem

« back to all changes in this revision

Viewing changes to qml/Launcher/LauncherPanel.qml

  • Committer: CI Train Bot
  • Author(s): Michael Zanetti
  • Date: 2015-02-11 17:11:12 UTC
  • mfrom: (1585.1.3 unity8-fix-launcher)
  • Revision ID: ci-train-bot@canonical.com-20150211171112-b6f4ibv7764wnruo
Launcher fixes for windowed mode

* When rotating the launcher because switching back and forth between staged/windowed mode, it would break the quicklist width
* Quicklist in rotated launcher painted the arrow on the wrong end
* snap animation fixed for a larger amount icons in the launcher. 
Approved by: Daniel d'Andrada, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
                        id: snapToBottomAnimation
150
150
                        target: launcherListView
151
151
                        property: "contentY"
152
 
                        to: launcherListView.originY
 
152
                        to: launcherListView.originY + launcherListView.topMargin
153
153
                    }
154
154
 
155
155
                    UbuntuNumberAnimation {
156
156
                        id: snapToTopAnimation
157
157
                        target: launcherListView
158
158
                        property: "contentY"
159
 
                        to: launcherListView.contentHeight - launcherListView.height + launcherListView.originY
 
159
                        to: launcherListView.contentHeight - launcherListView.height + launcherListView.originY - launcherListView.topMargin
160
160
                    }
161
161
 
162
162
                    displaced: Transition {
521
521
                left: parent.left
522
522
                leftMargin: (quickList.item.width - units.gu(1)) / 2 - width / 2
523
523
                verticalCenter: parent.verticalCenter
524
 
                verticalCenterOffset: (parent.height / 2 + units.dp(3)) * (quickList.offset > 0 ? 1 : -1)
 
524
                verticalCenterOffset: (parent.height / 2 + units.dp(3)) * (quickList.offset > 0 ? 1 : -1) * (root.inverted ? 1 : -1)
525
525
            }
526
526
            height: units.gu(1)
527
527
            width: units.gu(2)
528
528
            source: "graphics/quicklist_tooltip.png"
529
 
            rotation: quickList.offset > 0 ? 0 : 180
 
529
            rotation: (quickList.offset > 0 ? 0 : 180) + (root.inverted ? 0 : 180)
530
530
        }
531
531
 
532
532
        InverseMouseArea {
543
543
        id: quickList
544
544
        objectName: "quickList"
545
545
        color: "#f5f5f5"
546
 
        width: units.gu(30)
 
546
        // Because we're setting left/right anchors depending on orientation, it will break the
 
547
        // width setting after rotating twice. This makes sure we also re-apply width on rotation
 
548
        width: root.inverted ? units.gu(30) : units.gu(30)
547
549
        height: quickListColumn.height
548
550
        visible: quickListShape.visible
549
551
        anchors {