warnings--
BUG:335522
This commit is contained in:
parent
ce329f4402
commit
051dabae5e
@ -98,8 +98,8 @@ FocusScope {
|
|||||||
id: buttonFrame
|
id: buttonFrame
|
||||||
|
|
||||||
visible: currentTab && currentTab !== null
|
visible: currentTab && currentTab !== null
|
||||||
x: layout.isHorizontal ? tabBarLayout.x + currentTab.x : 0
|
x: currentTab && layout.isHorizontal ? tabBarLayout.x + currentTab.x : 0
|
||||||
y: layout.isHorizontal ? 0 : tabBarLayout.y + currentTab.y
|
y: !currentTab || layout.isHorizontal ? 0 : tabBarLayout.y + currentTab.y
|
||||||
width: currentTab && layout.isHorizontal ? currentTab.width + margins.left + margins.right -1 : parent.width
|
width: currentTab && layout.isHorizontal ? currentTab.width + margins.left + margins.right -1 : parent.width
|
||||||
height: !currentTab || layout.isHorizontal ? parent.height : currentTab.height + margins.top + margins.bottom
|
height: !currentTab || layout.isHorizontal ? parent.height : currentTab.height + margins.top + margins.bottom
|
||||||
imagePath: "widgets/tabbar"
|
imagePath: "widgets/tabbar"
|
||||||
@ -172,6 +172,9 @@ FocusScope {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onCurrentTabChanged: {
|
onCurrentTabChanged: {
|
||||||
|
if (!currentTab) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (layout.isHorizontal) {
|
if (layout.isHorizontal) {
|
||||||
tabBarLayout.x = Math.max(Math.min(0, -(currentTab.x + currentTab.width/2) + tabbarScroller.width/2), -tabBarLayout.width + tabbarScroller.width);
|
tabBarLayout.x = Math.max(Math.min(0, -(currentTab.x + currentTab.width/2) + tabbarScroller.width/2), -tabBarLayout.width + tabbarScroller.width);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user