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
=== modified file 'modules/Ubuntu/Components/Extras/TabsBar.qml'
--- modules/Ubuntu/Components/Extras/TabsBar.qml 2017-01-16 15:31:24 +0000
+++ modules/Ubuntu/Components/Extras/TabsBar.qml 2017-04-04 13:36:18 +0000
@@ -174,7 +174,9 @@
174 scrollAnimation.running = true;174 scrollAnimation.running = true;
175 }175 }
176176
177 property int indexFirstVisibleItem: indexAt(contentX+1, height / 2)177 // FIXME: using 'width-width' is a workaround to make sure
178 // 'indexFirstVisibleItem' is re-evaluated whenever width changes
179 property int indexFirstVisibleItem: indexAt(width-width+contentX+1, height / 2)
178 property int indexLastVisibleItem: indexAt(contentX+width-1, height / 2)180 property int indexLastVisibleItem: indexAt(contentX+width-1, height / 2)
179 property real minimumTabWidth: units.gu(15)181 property real minimumTabWidth: units.gu(15)
180 property int maximumTabsCount: Math.floor((tabsBar.width - actions.width - units.gu(1)) / minimumTabWidth)182 property int maximumTabsCount: Math.floor((tabsBar.width - actions.width - units.gu(1)) / minimumTabWidth)

Subscribers

People subscribed via source and target branches