prettify code spacing

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=765102
This commit is contained in:
Chani Armitage 2008-01-23 07:01:03 +00:00
parent 11f9ad3064
commit 593a6c8103
2 changed files with 87 additions and 86 deletions

View File

@ -165,8 +165,7 @@ public:
newPos = pos + size + q->spacing();
break;
case RightToLeft:
newGeometry = QRectF(geometry.width()-pos-size,top,
size,height);
newGeometry = QRectF(geometry.width() - pos - size, top, size, height);
newPos = pos - size - q->spacing();
break;
case TopToBottom:
@ -174,8 +173,7 @@ public:
newPos = pos + size + q->spacing();
break;
case BottomToTop:
newGeometry = QRectF(top,geometry.height()-pos-size,
height,size);
newGeometry = QRectF(top, geometry.height() - pos - size, height, size);
newPos = pos - size - q->spacing();
break;
}
@ -286,6 +284,7 @@ void BoxLayout::setDirection(Direction direction)
d->direction = direction;
updateGeometry();
}
BoxLayout::Direction BoxLayout::direction() const
{
return d->direction;
@ -460,9 +459,10 @@ void BoxLayout::relayout()
isExpanding = isExpanding && itemExp;
minItemSize = qMax(minItemSize, d->size(item->minimumSize()));
maxItemSize = qMin(maxItemSize, d->size(item->maximumSize()));
if(!itemExp)
if (!itemExp) {
hint = qMax(hint, d->size(item->sizeHint()));
}
}
if (isExpanding) {
sizes[i] = perItemSize;
@ -520,8 +520,9 @@ void BoxLayout::relayout()
int newPos = pos;
for (int row = 0; row < d->rowCount; row++) {
int i = col * d->rowCount + row;
if(i>=count())
if (i >= count()) {
break;
}
//QObject *obj = dynamic_cast<QObject*>(d->children[i]);
//if ( obj )