mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 11:40:37 +00:00
Small tidyup in NSSplitView -adjustSubviews
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26419 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f5c9c19113
commit
190c13dca9
2 changed files with 8 additions and 5 deletions
|
@ -633,7 +633,6 @@ static NSNotificationCenter *nc = nil;
|
|||
NSSize newSize;
|
||||
NSPoint newPoint;
|
||||
unsigned i;
|
||||
NSRect r;
|
||||
float oldTotal;
|
||||
float newTotal;
|
||||
float scale;
|
||||
|
@ -659,7 +658,6 @@ static NSNotificationCenter *nc = nil;
|
|||
{
|
||||
float newHeight;
|
||||
|
||||
r = [views[i] frame];
|
||||
newHeight = NSHeight(frames[i]) * scale;
|
||||
if (i == count - 1)
|
||||
{
|
||||
|
@ -682,7 +680,8 @@ static NSNotificationCenter *nc = nil;
|
|||
oldTotal = 0.0;
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
oldTotal += NSWidth([views[i] frame]);
|
||||
frames[i] = [views[i] frame];
|
||||
oldTotal += NSWidth(frames[i]);
|
||||
}
|
||||
scale = newTotal/oldTotal;
|
||||
running = 0.0;
|
||||
|
@ -690,8 +689,7 @@ static NSNotificationCenter *nc = nil;
|
|||
{
|
||||
float newWidth;
|
||||
|
||||
r = [views[i] frame];
|
||||
newWidth = NSWidth(r) * scale;
|
||||
newWidth = NSWidth(frames[i]) * scale;
|
||||
if (i == count - 1)
|
||||
{
|
||||
newWidth = floor(newWidth);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue