on xenial help sign in
Adapted launcher-icon alert related qmltests, fixed general qml-warnings... QIODevice-warning still to sort out.
commit8f1adcc8f2368e3192536b5b378292871e2d88de authorMirco Müller <mirco.mueller@canonical.com> dateWed 15 Jul 2015, 15:01 (11 years ago) parentd74eb9f
2 files changed+4−5
qml/Launcher/LauncherPanel.qml+3−3 tests/qmltests/Launcher/tst_Launcher.qml+1−2
qml/Launcher/LauncherPanel.qml+3−3
@@ -593,7 +593,7 @@ Rectangle {
593593 Image {
594594 anchors {
595595 left: parent.left
596− leftMargin: (quickList.item.width - units.gu(1)) / 2 - width / 2
596+ leftMargin: quickList.item !== undefined ? (quickList.item.width - units.gu(1)) / 2 - width / 2 : 0
597597 verticalCenter: parent.verticalCenter
598598 verticalCenterOffset: (parent.height / 2 + units.dp(3)) * (quickList.offset > 0 ? 1 : -1) * (root.inverted ? 1 : -1)
599599 }
@@ -636,9 +636,9 @@ Rectangle {
636636
637637 // internal
638638 property int itemCenter: item ? root.mapFromItem(quickList.item).y + (item.height / 2) : units.gu(1)
639− property int offset: itemCenter + (item.height/2) + height + units.gu(1) > parent.height ?
639+ property int offset: item !== undefined ? (itemCenter + (item.height/2) + height + units.gu(1) > parent.height ?
640640 -(item.height/2) - height - units.gu(.5) :
641− (item.height/2) + units.gu(.5)
641+ (item.height/2) + units.gu(.5)) : 0
642642
643643 Column {
644644 id: quickListColumn
tests/qmltests/Launcher/tst_Launcher.qml+1−2
@@ -749,12 +749,11 @@ Item {
749749 var listView = findChild(launcher, "launcherListView")
750750 verify(listView != undefined)
751751 LauncherModel.setAlerting(LauncherModel.get(5).appId, true)
752− waitForWiggleToStart(appIcon5)
753752 tryCompare(listView, "peekingIndex", 5, 1000, "Wrong appId set as peeking-index")
753+ waitForWiggleToStart(appIcon5)
754754 tryCompare(appIcon5, "wiggling", true, 1000, "appId #6 should not be still")
755755 dragLauncherIntoView();
756756 tryCompare(listView, "peekingIndex", -1, 1000, "peeking-index should be -1")
757− tryCompare(appIcon5, "wiggling", true, 1000, "appId #1 should not be still")
758757 LauncherModel.setAlerting(LauncherModel.get(5).appId, false)
759758 waitForWiggleToStop(appIcon5)
760759 tryCompare(appIcon5, "wiggling", false, 1000, "appId #1 should not be wiggling")