mirror of
https://github.com/transmission/transmission
synced 2025-02-03 21:12:05 +00:00
Fixed new bug from auto resizing, I hope.
This commit is contained in:
parent
d442d0579f
commit
f924699169
1 changed files with 13 additions and 5 deletions
|
@ -2127,12 +2127,20 @@ 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, maxHeight;
|
||||
if (newHeight < (minHeight = [fWindow minSize].height))
|
||||
float minHeight = [fWindow minSize].height;
|
||||
if (newHeight < minHeight)
|
||||
newHeight = minHeight;
|
||||
else if (newHeight > (maxHeight = [[fWindow screen] visibleFrame].size.height))
|
||||
newHeight = maxHeight;
|
||||
else;
|
||||
else
|
||||
{
|
||||
float maxHeight = [[fWindow screen] visibleFrame].size.height;
|
||||
if (!fStatusBarVisible)
|
||||
maxHeight -= [fStatusBar frame].size.height;
|
||||
if (!fFilterBarVisible)
|
||||
maxHeight -= [fFilterBar frame].size.height;
|
||||
|
||||
if (newHeight > maxHeight)
|
||||
newHeight = maxHeight;
|
||||
}
|
||||
|
||||
frame.origin.y -= (newHeight - frame.size.height);
|
||||
frame.size.height = newHeight;
|
||||
|
|
Loading…
Reference in a new issue