on xenial help sign in
Merge pull request #158 from ubports/xenial_-_edge_-_fixpanelpos

[panel] Let qt handle calculation of contentX to avoid race condition

commit778b273489f3f98329a26fa61516281bc0341600 authorMarius Gripsgard <marius@ubports.com> dateSat 29 Jun 2019, 15:51 (7 years ago) parenta37d0284e980e1
1 file changed+4−1
qml/Panel/MenuContent.qml+4−1
qml/Panel/MenuContent.qml+4−1
@@ -45,7 +45,6 @@ Rectangle {
4545 model: content.model
4646
4747 highlightFollowsCurrentItem: false
48− contentX: currentIndex * width
4948 interactive: false
5049 orientation: ListView.Horizontal
5150 // Load all the indicator menus (a big number)
@@ -56,6 +55,10 @@ Rectangle {
5655 listViewContent.currentIndex = content.currentMenuIndex;
5756 }
5857
58+ onCurrentIndexChanged: {
59+ positionViewAtIndex(currentIndex, ListView.Beginning);
60+ }
61+
5962 delegate: Loader {
6063 id: loader
6164