Merge lp:~tpeeters/ubuntu-ui-toolkit/header-no-start-animation into lp:ubuntu-ui-toolkit

Proposed by Tim Peeters
Status: Merged
Approved by: Zsombor Egri
Approved revision: 865
Merged at revision: 872
Proposed branch: lp:~tpeeters/ubuntu-ui-toolkit/header-no-start-animation
Merge into: lp:ubuntu-ui-toolkit
Prerequisite: lp:~tpeeters/ubuntu-ui-toolkit/tabBar-selectionMode-fix
Diff against target: 55 lines (+18/-5)
1 file modified
modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml (+18/-5)
To merge this branch: bzr merge lp:~tpeeters/ubuntu-ui-toolkit/header-no-start-animation
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Zsombor Egri Approve
Review via email: mp+196251@code.launchpad.net

Commit message

Disable header animations at app startup

Description of the change

Disable header animations at app startup

Also, use parent.width in TabBarStyle's buttonView instead of tabBar.width because tabBar is not even defined in TabBarStyle.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Zsombor Egri (zsombi) wrote :

Code wise looks good, thanks!

review: Approve
Revision history for this message
Tim Peeters (tpeeters) wrote :

Tested apps on nexus 10 and galaxy nexus. Everything works well.

Ran AP tests on galaxy nexus, also successful.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml'
2--- modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml 2013-11-22 10:08:21 +0000
3+++ modules/Ubuntu/Components/Themes/Ambiance/TabBarStyle.qml 2013-11-28 23:12:36 +0000
4@@ -23,7 +23,16 @@
5 property color headerTextColor: Theme.palette.normal.backgroundText
6 property color headerTextSelectedColor: Theme.palette.selected.backgroundText
7
8- property int headerTextFadeDuration: styledItem.animate ? 350 : 0
9+ // Don't start transitions because of updates to selectionMode before styledItem is completed.
10+ // This fixes bug #1246792: "Disable tabs scrolling animations at startup"
11+ property bool animate: false
12+ Binding {
13+ target: tabBarStyle
14+ property: "animate"
15+ when: styledItem.width > 0
16+ value: styledItem.animate
17+ }
18+ property int headerTextFadeDuration: animate ? 350 : 0
19 property url indicatorImageSource: "artwork/chevron.png"
20
21 property string headerFontSize: "x-large"
22@@ -34,7 +43,7 @@
23 property real headerTextRightMargin: units.gu(2)
24 property real headerTextBottomMargin: units.gu(2)
25
26- property real buttonPositioningVelocity: styledItem.animate ? 1.0 : -1
27+ property real buttonPositioningVelocity: animate ? 1.0 : -1
28 // The time of inactivity before leaving selection mode automatically
29 property int deactivateTime: 5000
30
31@@ -222,7 +231,12 @@
32
33 PathView {
34 id: buttonView
35- anchors.fill: parent
36+ anchors {
37+ top: parent.top
38+ bottom: parent.bottom
39+ left: parent.left
40+ }
41+ width: needsScrolling ? parent.width : buttonRowWidth
42
43 // set to the width of one tabButtonRow in Component.onCompleted.
44 property real buttonRowWidth: buttonRow1 ? buttonRow1.width : 0
45@@ -236,9 +250,8 @@
46
47 delegate: tabButtonRow
48 model: 2 // The second buttonRow shows the buttons that disappear on the left
49- property bool needsScrolling: buttonRowWidth > tabBar.width
50+ property bool needsScrolling: buttonRowWidth > parent.width
51 interactive: needsScrolling
52- width: needsScrolling ? tabBar.width : buttonRowWidth
53 clip: needsScrolling
54
55 highlightRangeMode: PathView.NoHighlightRange

Subscribers

People subscribed via source and target branches

to status/vote changes: