layout fixes
don't count things that aren't buttons in thewidth calculations
This commit is contained in:
parent
2f6b8d2687
commit
0bd0641e3e
@ -143,8 +143,8 @@ Item {
|
||||
Private.IconLoader {
|
||||
id: imageLoader
|
||||
|
||||
implicitWidth: theme.smallIconSize
|
||||
implicitHeight: theme.smallIconSize
|
||||
implicitWidth: internal.portrait ? Math.max(theme.smallIconSize, root.height - (label.text ? label.height : 0)) : Math.max(theme.smallIconSize, root.height)
|
||||
implicitHeight: implicitWidth
|
||||
|
||||
anchors {
|
||||
left: internal.portrait ? undefined : parent.left
|
||||
|
@ -112,11 +112,11 @@ Item {
|
||||
if (childCount != 0) {
|
||||
//not too much efficient but the loop over children needs to be done two times to get the proper child width
|
||||
for (var i = 0; i < childCount; ++i) {
|
||||
if (!root.children[i].visible) {
|
||||
if (!root.children[i].visible || root.children[i].text == undefined) {
|
||||
--visibleChildCount
|
||||
}
|
||||
}
|
||||
var itemWidth = (root.width - (childCount-1)*10) / visibleChildCount
|
||||
var itemWidth = (root.width - (visibleChildCount-1)*10) / visibleChildCount
|
||||
var itemIndex = mirrored ? childCount - 1 : 0
|
||||
var increment = mirrored ? - 1 : 1
|
||||
var visibleIndex = 0
|
||||
|
Loading…
Reference in New Issue
Block a user