mirror of
https://github.com/transmission/transmission
synced 2025-02-20 13:16:53 +00:00
hide search filter if it overlaps filter buttons
This commit is contained in:
parent
c757564bb7
commit
9090aacff8
1 changed files with 18 additions and 0 deletions
|
@ -2032,6 +2032,24 @@ static void sleepCallBack(void * controller, io_service_t y,
|
|||
fCompleted = 0;
|
||||
}
|
||||
|
||||
- (void) windowDidResize: (NSNotification *) notification
|
||||
{
|
||||
//hide search filter if it overlaps filter buttons
|
||||
NSRect buttonFrame = [fPauseFilterButton frame];
|
||||
BOOL overlap = buttonFrame.origin.x + buttonFrame.size.width > [fSearchFilterField frame].origin.x;
|
||||
|
||||
if (![fSearchFilterField isHidden])
|
||||
{
|
||||
if (overlap)
|
||||
[fSearchFilterField setHidden: YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!overlap)
|
||||
[fSearchFilterField setHidden: NO];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) linkHomepage: (id) sender
|
||||
{
|
||||
[[NSWorkspace sharedWorkspace] openURL: [NSURL URLWithString: WEBSITE_URL]];
|
||||
|
|
Loading…
Reference in a new issue