[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdebase/kicker/core
From: Wilco Greven <greven () kde ! org>
Date: 2004-11-04 13:12:48
Message-ID: 20041104131248.0B4E616D1B () office ! kde ! org
[Download RAW message or body]
CVS commit by wgreven:
Shorten and clarify the comments a bit.
M +8 -10 containerarealayout.cpp 1.4
--- kdebase/kicker/core/containerarealayout.cpp #1.3:1.4
@@ -347,5 +347,5 @@ void ContainerAreaLayout::moveContainerS
while (next)
{
- // calculate the position and width of the 'virtual' container
+ // Calculate the position and width of the virtual container
// containing 'moving' and 'next'.
int tpos = forward ? next->leftR() - moving->widthR()
@@ -353,17 +353,15 @@ void ContainerAreaLayout::moveContainerS
int tsize = moving->widthR() + next->widthR();
- // determine the middle of the containers.
+ // Determine the middle of the containers.
int tmiddle = tpos + tsize / 2;
int movingMiddle = moving->leftR() + distance + moving->widthR() / 2;
- // move 'next' from the right side of the virtual container to
- // the left side if the middle of 'moving' has moved far enough
- // to the left, i.e. past the middle of the virtual container
- // plus the switchMargin. The switchMargin prevents rapidly
- // switching when 'moving' and 'next' have the same size.
+ // Check if the middle of 'moving' has moved past the middle of the
+ // virtual container.
if (!forward && movingMiddle > tmiddle
|| forward && movingMiddle < tmiddle)
break;
+ // Move 'next' to the other side of 'moving'.
QRect geom = next->geometryR();
if (forward)
@@ -373,6 +371,6 @@ void ContainerAreaLayout::moveContainerS
next->setGeometryR(geom);
- // store 'next', because it may become null in the next step, so that we
- // can't iterate back.
+ // Store 'next'. It may become null in the next iteration, but we
+ // need its value later.
last = next;
next = forward ? ++it : --it;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic