more spacing

This commit is contained in:
Marco Martin 2011-11-14 11:16:20 +01:00
parent a481b9a7cd
commit ca2e34e48e
2 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ Item {
//Plasma extension
property Item currentItem
implicitWidth: tabBarLayout.implicitWidth + backgroundFrame.margins.left + backgroundFrame.margins.right + buttonFrame.margins.left + buttonFrame.margins.right
implicitWidth: tabBarLayout.implicitWidth + backgroundFrame.margins.left + backgroundFrame.margins.right + (buttonFrame.margins.left + buttonFrame.margins.right)*tabBarLayout.children.length
implicitHeight: tabBarLayout.implicitHeight + backgroundFrame.margins.top + backgroundFrame.margins.bottom + buttonFrame.margins.top + buttonFrame.margins.bottom
PlasmaCore.FrameSvgItem {

View File

@ -92,19 +92,19 @@ Item {
var contentWidth = 0
var contentHeight = 0
if (childCount != 0) {
var itemWidth = root.width / childCount
var itemWidth = (root.width - (childCount-1)*10) / childCount
var itemIndex = mirrored ? childCount - 1 : 0
var increment = mirrored ? - 1 : 1
for (var i = 0; i < childCount; ++i, itemIndex += increment) {
var child = root.children[itemIndex]
child.x = i * itemWidth
child.x = i * itemWidth + i*10
child.y = 0
child.width = itemWidth
child.height = root.height
if (child.implicitWidth != undefined) {
contentWidth = Math.max(contentWidth, (child.implicitWidth + buttonFrame.margins.left*2 + buttonFrame.margins.right*2) * childCount)
contentWidth = Math.max(contentWidth + i*10, (child.implicitWidth + buttonFrame.margins.left*2 + buttonFrame.margins.right*2) * childCount)
contentHeight = Math.max(contentHeight, (child.implicitHeight + buttonFrame.margins.top + buttonFrame.margins.bottom))
}
}