diff --git a/macosx/Controller.m b/macosx/Controller.m index 336a69303..a8e1b9a50 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -47,7 +47,7 @@ #define TORRENT_TABLE_VIEW_DATA_TYPE @"TorrentTableViewDataType" -#define ROW_HEIGHT_REGULAR 165.0 +#define ROW_HEIGHT_REGULAR 65.0 #define ROW_HEIGHT_SMALL 40.0 #define WINDOW_REGULAR_WIDTH 468.0 @@ -2127,13 +2127,12 @@ static void sleepCallBack(void * controller, io_service_t y, natural_t messageTy float newHeight = frame.size.height - [fScrollView frame].size.height + [fFilteredTorrents count] * ([fTableView rowHeight] + [fTableView intercellSpacing].height); - float minHeight = [fWindow minSize].height; - if (newHeight < minHeight) + float minHeight, maxHeight; + if (newHeight < (minHeight = [fWindow minSize].height)) newHeight = minHeight; - - float maxHeight = [[fWindow screen] visibleFrame].size.height; - if (newHeight > maxHeight) + else if (newHeight > (maxHeight = [[fWindow screen] visibleFrame].size.height)) newHeight = maxHeight; + else; frame.origin.y -= (newHeight - frame.size.height); frame.size.height = newHeight;