Merge lp:~fboucault/ubuntu-ui-extras/fix_left_counter into lp:ubuntu-ui-extras/staging

Proposed by Florian Boucault on 2017-04-05
Status: Needs review
Proposed branch: lp:~fboucault/ubuntu-ui-extras/fix_left_counter
Merge into: lp:ubuntu-ui-extras/staging
Diff against target: 14 lines (+3/-1)
1 file modified
modules/Ubuntu/Components/Extras/TabsBar.qml (+3/-1)
To merge this branch: bzr merge lp:~fboucault/ubuntu-ui-extras/fix_left_counter
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing on 2017-04-05
Andrew Hayzen (community) 2017-04-05 Approve on 2017-04-05
Review via email: mp+321989@code.launchpad.net

This proposal supersedes a proposal from 2017-04-04.

Commit message

Recompute 'indexFirstVisibleItem' whenever tabs.width changes. Fixes cases where the number of invisible tabs on the left is incorrect.

Description of the change

Recompute 'indexFirstVisibleItem' whenever tabs.width changes. Fixes cases where the number of invisible tabs on the left is incorrect.

To post a comment you must log in.
Andrew Hayzen (ahayzen) wrote :

Fixes the issue, nice hack :-)

review: Approve
Andrew Hayzen (ahayzen) wrote :

Ah wrong merge...

Andrew Hayzen (ahayzen) wrote :

Fixed :-)

PASSED: Continuous integration, rev:128
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-ui-extras-staging-ci/11/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/2427
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2427
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2238
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2238/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2238
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2238/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2238
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2238/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2238
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2238/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2238
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2238/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2238
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2238/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-ui-extras-staging-ci/11/rebuild

review: Approve (continuous-integration)

FAILED: Autolanding.
More details in the following jenkins job:
https://jenkins.canonical.com/system-apps/job/lp-ubuntu-ui-extras-staging-autoland/53/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/2453/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/2453
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2264
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/2264/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2264
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=zesty/2264/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2264
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/2264/artifact/output/*zip*/output.zip
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=zesty/2264/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2264
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/2264/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2264
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=zesty/2264/artifact/output/*zip*/output.zip

review: Needs Fixing (continuous-integration)

Unmerged revisions

128. By Florian Boucault on 2017-04-04

Recompute 'indexFirstVisibleItem' whenever tabs.width changes. Fixes cases where the number of invisible tabs on the left is incorrect.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/Ubuntu/Components/Extras/TabsBar.qml'
2--- modules/Ubuntu/Components/Extras/TabsBar.qml 2017-01-16 15:31:24 +0000
3+++ modules/Ubuntu/Components/Extras/TabsBar.qml 2017-04-05 13:31:32 +0000
4@@ -174,7 +174,9 @@
5 scrollAnimation.running = true;
6 }
7
8- property int indexFirstVisibleItem: indexAt(contentX+1, height / 2)
9+ // FIXME: using 'width-width' is a workaround to make sure
10+ // 'indexFirstVisibleItem' is re-evaluated whenever width changes
11+ property int indexFirstVisibleItem: indexAt(width-width+contentX+1, height / 2)
12 property int indexLastVisibleItem: indexAt(contentX+width-1, height / 2)
13 property real minimumTabWidth: units.gu(15)
14 property int maximumTabsCount: Math.floor((tabsBar.width - actions.width - units.gu(1)) / minimumTabWidth)

Subscribers

People subscribed via source and target branches