1
0
Fork 0
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:
Mitchell Livingston 2006-07-16 18:39:19 +00:00
parent c757564bb7
commit 9090aacff8

View file

@ -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]];