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

Proposed by Florian Boucault
Status: Superseded
Proposed branch: lp:~fboucault/ubuntu-ui-extras/fix_left_counter
Merge into: lp:ubuntu-ui-extras
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
Andrew Hayzen Pending
Review via email: mp+321858@code.launchpad.net

This proposal has been superseded by a proposal from 2017-04-05.

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.

Unmerged revisions

128. By Florian Boucault

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-04 13:36:18 +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