on xenial help sign in
visual tweaks/fixes
commitc8e87c2d87d4f87a7a1733172534f1eedeeab90f authorNick Dedekind <nick.dedekind@canonical.com> dateWed 1 Oct 2014, 16:30 (12 years ago) parent4af4e83
3 files changed+36−26
qml/Panel/IndicatorItem.qml+15−7 qml/Panel/IndicatorItemRow.qml+15−14 qml/Panel/IndicatorsMenu.qml+6−5
qml/Panel/IndicatorItem.qml+15−7
@@ -34,9 +34,9 @@ IndicatorDelegate {
3434 property bool selected: false
3535 property real iconHeight: units.gu(2)
3636 readonly property color color: {
37− if (!expanded) return "#CCCCCC";
37+ if (!expanded) return "#ededed";
3838 if (!selected) return "#4c4c4c";
39− return Theme.palette.normal.foregroundText;
39+ return "#ededed";
4040 }
4141
4242 signal clicked()
@@ -78,7 +78,7 @@ IndicatorDelegate {
7878 font.family: "Ubuntu"
7979 fontSize: "medium"
8080 color: root.color
81− Behavior on color { ColorAnimation { duration: UbuntuAnimation.SnapDuration } }
81+ Behavior on color { ColorAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing } }
8282 }
8383
8484 Item {
@@ -91,6 +91,13 @@ IndicatorDelegate {
9191 verticalCenter: parent.verticalCenter
9292 }
9393
94+ opacity: {
95+ if (!expanded) return 1.0;
96+ if (!selected) return 0.6;
97+ return 1.0;
98+ }
99+ Behavior on opacity { NumberAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing } }
100+
94101 Row {
95102 id: iconRow
96103 anchors.centerIn: iconsItem
@@ -108,7 +115,7 @@ IndicatorDelegate {
108115 source: modelData
109116 sets: ["status", "actions"]
110117 color: root.color
111− Behavior on color { ColorAnimation{ duration: UbuntuAnimation.SnapDuration } }
118+ Behavior on color { ColorAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing } }
112119 }
113120 }
114121 }
@@ -129,7 +136,7 @@ IndicatorDelegate {
129136 font.family: "Ubuntu"
130137 fontSize: "medium"
131138 color: root.color
132− Behavior on color { ColorAnimation{ duration: UbuntuAnimation.SnapDuration } }
139+ Behavior on color { ColorAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing } }
133140 }
134141 }
135142
@@ -147,7 +154,7 @@ IndicatorDelegate {
147154 horizontalAlignment: Text.AlignHCenter
148155 opacity: 0
149156 color: root.color
150− Behavior on color { ColorAnimation{ duration: UbuntuAnimation.SnapDuration } }
157+ Behavior on color { ColorAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing } }
151158 }
152159
153160 StateGroup {
@@ -223,12 +230,13 @@ IndicatorDelegate {
223230 transitions: [
224231 Transition {
225232 PropertyAction { target: d; property: "useFallbackIcon" }
233+ PropertyAction { target: iconsItem; property: "opacity" }
226234 AnchorAnimation {
227235 targets: [ mainItems, iconsItem, leftLabelItem, rightLabelItem ]
228236 duration: UbuntuAnimation.SnapDuration; easing: UbuntuAnimation.StandardEasing
229237 }
230238 PropertyAnimation {
231− targets: [ root, mainItems, iconsItem, leftLabelItem, rightLabelItem, indicatorName ]
239+ targets: [ root, mainItems, leftLabelItem, rightLabelItem, indicatorName ]
232240 properties: "width, opacity, anchors.verticalCenterOffset";
233241 duration: UbuntuAnimation.SnapDuration; easing: UbuntuAnimation.StandardEasing
234242 }
qml/Panel/IndicatorItemRow.qml+15−14
@@ -173,6 +173,17 @@ Item {
173173 id: highlight
174174 objectName: "highlight"
175175
176+ anchors.bottom: row.bottom
177+ height: units.dp(2)
178+ color: "#ededed"
179+ visible: root.currentItem !== null
180+ opacity: 0.0
181+
182+ width: currentItem ? currentItem.width : 0
183+ Behavior on width {
184+ UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
185+ }
186+
176187 // micromovements of the highlight line when user moves the finger across the items while pulling
177188 // the handle downwards.
178189 property real highlightCenterOffset: {
@@ -190,7 +201,7 @@ Item {
190201
191202 if (currentItem && currentItem.ownIndex === 0 && distanceFromCenter < 0) {
192203 return 0;
193− } else if (currentItem && currentItem.ownIndex == repeater.count-1 & distanceFromCenter > 0) {
204+ } else if (currentItem && currentItem.ownIndex === repeater.count-1 & distanceFromCenter > 0) {
194205 return 0;
195206 }
196207
@@ -198,24 +209,14 @@ Item {
198209 return shiftPercentageOffset * units.gu(1);
199210 }
200211 Behavior on highlightCenterOffset {
201− SmoothedAnimation {duration:UbuntuAnimation.FastDuration; velocity: 50}
212+ SmoothedAnimation { duration:UbuntuAnimation.FastDuration; velocity: 50; easing: UbuntuAnimation.StandardEasin }
202213 }
203214
204− anchors.bottom: row.bottom
205− height: units.dp(2)
206− width: currentItem ? currentItem.width : 0
207− color: "white"
208− visible: root.currentItem !== null
209− opacity: 0.0
210−
211215 property real currentItemX: currentItem ? currentItem.x : 0 // having Behavior
212− Behavior on x {
216+ Behavior on currentItemX {
213217 id: currentItemXBehavior
214218 enabled: !d.firstItemSwitch && expanded
215− UbuntuNumberAnimation {
216− duration: UbuntuAnimation.FastDuration;
217− easing: UbuntuAnimation.StandardEasing
218− }
219+ UbuntuNumberAnimation { duration: UbuntuAnimation.FastDuration; easing: UbuntuAnimation.StandardEasing }
219220 }
220221 x: currentItemX + highlightCenterOffset
221222 }
qml/Panel/IndicatorsMenu.qml+6−5
@@ -24,7 +24,7 @@ Showable {
2424 property int minimizedPanelHeight: units.gu(3)
2525 property int expandedPanelHeight: units.gu(7)
2626 property real openedHeight: units.gu(71)
27− readonly property int lockThreshold: openedHeight / 2
27+ readonly property int lockThreshold: openedHeight * (2 / 3)
2828 property alias indicatorsModel: bar.indicatorsModel
2929 property alias overFlowWidth: bar.overFlowWidth
3030 property bool enableHint: true
@@ -45,14 +45,14 @@ Showable {
4545 showAnimation: StandardAnimation {
4646 property: "height"
4747 to: openedHeight
48− duration: UbuntuAnimation.SlowDuration
48+ duration: UbuntuAnimation.BriskDuration
4949 easing.type: Easing.OutCubic
5050 }
5151
5252 hideAnimation: StandardAnimation {
5353 property: "height"
5454 to: minimizedPanelHeight
55− duration: UbuntuAnimation.SlowDuration
55+ duration: UbuntuAnimation.BriskDuration
5656 easing.type: Easing.OutCubic
5757 }
5858
@@ -70,6 +70,7 @@ Showable {
7070 }
7171 }
7272 }
73+ clip: root.partiallyOpened
7374
7475 MenuContent {
7576 id: content
@@ -78,7 +79,7 @@ Showable {
7879 anchors {
7980 left: parent.left
8081 right: parent.right
81− bottom: handle.top
82+ top: bar.bottom
8283 }
8384 height: openedHeight - bar.height - handle.height
8485 indicatorsModel: root.indicatorsModel
@@ -279,7 +280,7 @@ Showable {
279280 if (!d.activeDragHandle.dragging) return false;
280281
281282 yVelocityCalculator.trackedPosition = d.activeDragHandle ? d.activeDragHandle.touchSceneY : 0
282− return Math.abs(yVelocityCalculator.calculate()) < 0.1;
283+ return Math.abs(yVelocityCalculator.calculate()) < 0.2;
283284 }
284285 }
285286 // left scroll bar handling