1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-03-10 06:02:57 +00:00

refinement to the resizing web seeds table code

This commit is contained in:
Mitchell Livingston 2008-06-08 01:27:49 +00:00
parent 0a9e5d6bad
commit e0e086b8cb
2 changed files with 5 additions and 4 deletions

View file

@ -65,7 +65,7 @@
IBOutlet PiecesView * fPiecesView;
IBOutlet NSSegmentedControl * fPiecesControl;
BOOL fWebSeedTableHidden;
float fPeerTableHeight, fWebSeedTableOrigin;
float fPeerTableHeight, fWebSeedTableHeight, fWebSeedTableOrigin;
IBOutlet FileOutlineController * fFileController;

View file

@ -176,6 +176,7 @@ typedef enum
//prepare for animating peer table and web seed table
fWebSeedTableHidden = NO;
fPeerTableHeight = [[fPeerTable enclosingScrollView] frame].size.height;
fWebSeedTableHeight = [[fWebSeedTable enclosingScrollView] frame].size.height;
fWebSeedTableOrigin = [[fWebSeedTable enclosingScrollView] frame].origin.y;
[self setWebSeederTableHidden: YES animate: NO];
@ -1454,7 +1455,7 @@ typedef enum
if (hidden)
{
float webSeedFrameMaxY = NSMaxY(webSeedFrame);
float webSeedFrameMaxY = fWebSeedTableHeight + fWebSeedTableOrigin;
peerFrame.size.height = webSeedFrameMaxY - peerFrame.origin.y;
webSeedFrame.origin.y = webSeedFrameMaxY;
@ -1464,9 +1465,9 @@ typedef enum
{
peerFrame.size.height = fPeerTableHeight;
webSeedFrame.size.height = webSeedFrame.origin.y - fWebSeedTableOrigin;
webSeedFrame.size.height = fWebSeedTableHeight;
webSeedFrame.origin.y = fWebSeedTableOrigin;
}
}NSLog(@"%f", webSeedFrame.size.height);
//actually resize tables
[NSAnimationContext beginGrouping];