prettify code spacing
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=765102
This commit is contained in:
parent
11f9ad3064
commit
593a6c8103
@ -165,8 +165,7 @@ public:
|
|||||||
newPos = pos + size + q->spacing();
|
newPos = pos + size + q->spacing();
|
||||||
break;
|
break;
|
||||||
case RightToLeft:
|
case RightToLeft:
|
||||||
newGeometry = QRectF(geometry.width()-pos-size,top,
|
newGeometry = QRectF(geometry.width() - pos - size, top, size, height);
|
||||||
size,height);
|
|
||||||
newPos = pos - size - q->spacing();
|
newPos = pos - size - q->spacing();
|
||||||
break;
|
break;
|
||||||
case TopToBottom:
|
case TopToBottom:
|
||||||
@ -174,8 +173,7 @@ public:
|
|||||||
newPos = pos + size + q->spacing();
|
newPos = pos + size + q->spacing();
|
||||||
break;
|
break;
|
||||||
case BottomToTop:
|
case BottomToTop:
|
||||||
newGeometry = QRectF(top,geometry.height()-pos-size,
|
newGeometry = QRectF(top, geometry.height() - pos - size, height, size);
|
||||||
height,size);
|
|
||||||
newPos = pos - size - q->spacing();
|
newPos = pos - size - q->spacing();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -286,6 +284,7 @@ void BoxLayout::setDirection(Direction direction)
|
|||||||
d->direction = direction;
|
d->direction = direction;
|
||||||
updateGeometry();
|
updateGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
BoxLayout::Direction BoxLayout::direction() const
|
BoxLayout::Direction BoxLayout::direction() const
|
||||||
{
|
{
|
||||||
return d->direction;
|
return d->direction;
|
||||||
@ -460,9 +459,10 @@ void BoxLayout::relayout()
|
|||||||
isExpanding = isExpanding && itemExp;
|
isExpanding = isExpanding && itemExp;
|
||||||
minItemSize = qMax(minItemSize, d->size(item->minimumSize()));
|
minItemSize = qMax(minItemSize, d->size(item->minimumSize()));
|
||||||
maxItemSize = qMin(maxItemSize, d->size(item->maximumSize()));
|
maxItemSize = qMin(maxItemSize, d->size(item->maximumSize()));
|
||||||
if(!itemExp)
|
if (!itemExp) {
|
||||||
hint = qMax(hint, d->size(item->sizeHint()));
|
hint = qMax(hint, d->size(item->sizeHint()));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isExpanding) {
|
if (isExpanding) {
|
||||||
sizes[i] = perItemSize;
|
sizes[i] = perItemSize;
|
||||||
@ -520,8 +520,9 @@ void BoxLayout::relayout()
|
|||||||
int newPos = pos;
|
int newPos = pos;
|
||||||
for (int row = 0; row < d->rowCount; row++) {
|
for (int row = 0; row < d->rowCount; row++) {
|
||||||
int i = col * d->rowCount + row;
|
int i = col * d->rowCount + row;
|
||||||
if(i>=count())
|
if (i >= count()) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
//QObject *obj = dynamic_cast<QObject*>(d->children[i]);
|
//QObject *obj = dynamic_cast<QObject*>(d->children[i]);
|
||||||
//if ( obj )
|
//if ( obj )
|
||||||
|
Loading…
Reference in New Issue
Block a user