From 4518dfc0ca3652b3f502fe72d6fac7c8a9aec306 Mon Sep 17 00:00:00 2001 From: Didier Korthoudt Date: Mon, 20 Aug 2018 13:12:22 +0200 Subject: [PATCH] FIXED: CPSearchField was positionning its menu with hard coded offset (#2691) --- AppKit/CPSearchField.j | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/AppKit/CPSearchField.j b/AppKit/CPSearchField.j index ece795923..a54d8f49f 100644 --- a/AppKit/CPSearchField.j +++ b/AppKit/CPSearchField.j @@ -74,6 +74,7 @@ var CPAutosavedRecentsChangedNotification = @"CPAutosavedRecentsChangedNotificat @"image-cancel-pressed": [CPNull null], @"image-search-inset" : CGInsetMake(0, 0, 0, 5), @"image-cancel-inset" : CGInsetMake(0, 5, 0, 0), + @"search-menu-offset": CGPointMake(10, -4), @"search-right-margin": 2 }; } @@ -690,7 +691,8 @@ var CPAutosavedRecentsChangedNotification = @"CPAutosavedRecentsChangedNotificat return; var aFrame = [[self superview] convertRect:[self frame] toView:nil], - location = CGPointMake(aFrame.origin.x + 10, aFrame.origin.y + aFrame.size.height - 4); + offset = [self currentValueForThemeAttribute:@"search-menu-offset"], + location = CGPointMake(aFrame.origin.x + offset.x, aFrame.origin.y + aFrame.size.height + offset.y); var anEvent = [CPEvent mouseEventWithType:CPRightMouseDown location:location modifierFlags:0 timestamp:[[CPApp currentEvent] timestamp] windowNumber:[[self window] windowNumber] context:nil eventNumber:1 clickCount:1 pressure:0];