on xenial help sign in
search bar animation less obvious
ffca0a3Nick Dedekind
Panel/Panel.qml+2−2
@@ -117,14 +117,14 @@ Item {
117 state: {
117 state: {
118 if (parent.width < indicatorsMenu.width + width) {
118 if (parent.width < indicatorsMenu.width + width) {
119 if (indicatorsMenu.state != "initial") {
119 if (indicatorsMenu.state != "initial") {
120− return "hiddenUp";
120+ return "hidden";
121 }
121 }
122 }
122 }
123 if (root.searchVisible) {
123 if (root.searchVisible) {
124 return "visible";
124 return "visible";
125 }
125 }
126
126
127− return "hiddenUp";
127+ return "hidden";
128 }
128 }
129
129
130 width: units.gu(13)
130 width: units.gu(13)
Panel/SearchIndicator.qml+1−4
@@ -42,7 +42,6 @@ Item {
42 height: parent.height
42 height: parent.height
43
43
44 Behavior on opacity { StandardAnimation {} }
44 Behavior on opacity { StandardAnimation {} }
45− Behavior on y {NumberAnimation {duration: 300; easing.type: Easing.OutCubic}}
46
45
47 Image {
46 Image {
48 id: icon
47 id: icon
@@ -68,15 +67,13 @@ Item {
68 name: "visible"
67 name: "visible"
69 PropertyChanges {
68 PropertyChanges {
70 target: container
69 target: container
71− y: 0
72 opacity: 1
70 opacity: 1
73 }
71 }
74 },
72 },
75 State {
73 State {
76− name: "hiddenUp"
74+ name: "hidden"
77 PropertyChanges {
75 PropertyChanges {
78 target: container
76 target: container
79− y: -height
80 opacity: 0
77 opacity: 0
81 }
78 }
82 }
79 }
tests/qmltests/Panel/tst_SearchIndicator.qml+8−10
@@ -41,24 +41,22 @@ Item {
41 when: windowShown
41 when: windowShown
42
42
43 function test_clickedSignal() {
43 function test_clickedSignal() {
44− clickedSpy.clear()
44+ clickedSpy.clear();
45 mouseClick(searchIndicator,
45 mouseClick(searchIndicator,
46 searchIndicator.width / 2, searchIndicator.height / 2);
46 searchIndicator.width / 2, searchIndicator.height / 2);
47− compare(clickedSpy.count, 1)
47+ compare(clickedSpy.count, 1);
48 }
48 }
49
49
50 function test_hideUp() {
50 function test_hideUp() {
51− var container = findChild(searchIndicator, "container")
51+ var container = findChild(searchIndicator, "container");
52− searchIndicator.state = "hiddenUp"
52+ searchIndicator.state = "hidden";
53− tryCompare(container, "opacity", 0)
53+ tryCompare(container, "opacity", 0);
54− tryCompare(container, "y", -container.height)
55 }
54 }
56
55
57 function test_show() {
56 function test_show() {
58− var container = findChild(searchIndicator, "container")
57+ var container = findChild(searchIndicator, "container");
59− searchIndicator.state = "visible"
58+ searchIndicator.state = "visible";
60− tryCompare(container, "opacity", 1)
59+ tryCompare(container, "opacity", 1);
61− tryCompare(container, "y", 0)
62 }
60 }
63 }
61 }
64}
62}