mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 08:30:59 +00:00
Check the scrollview style to display the autocomplete window.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37166 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2fe4c2e708
commit
f006045995
2 changed files with 17 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-09-29 German Arias <germanandre@gmx.es>
|
||||
|
||||
* Source/GSAutocompleteWindow.m (-computePosition): Check the scrollview
|
||||
style to display the autocomplete window.
|
||||
|
||||
2013-09-28 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/GSTheme.m:
|
||||
|
|
|
@ -199,6 +199,9 @@ static GSAutocompleteWindow *gsWindow = nil;
|
|||
NSRect rect;
|
||||
NSRect stringRect;
|
||||
NSPoint point;
|
||||
NSInterfaceStyle style;
|
||||
|
||||
style = NSInterfaceStyleForKey(@"NSScrollViewInterfaceStyle", nil);
|
||||
|
||||
rect = [self frame];
|
||||
screenFrame = [[[_textView window] screen] frame];
|
||||
|
@ -211,7 +214,15 @@ static GSAutocompleteWindow *gsWindow = nil;
|
|||
[_textView convertRect: stringRect toView: nil].origin];
|
||||
|
||||
// Calculate the origin point to the window.
|
||||
rect.origin.x = point.x - [NSScroller scrollerWidth] - 4;
|
||||
if (style == NSMacintoshInterfaceStyle
|
||||
|| style == NSWindows95InterfaceStyle)
|
||||
{
|
||||
rect.origin.x = point.x - 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
rect.origin.x = point.x - [NSScroller scrollerWidth] - 4;
|
||||
}
|
||||
rect.origin.y = point.y - rect.size.height;
|
||||
|
||||
// If part of the window is off screen, change the origin point.
|
||||
|
|
Loading…
Reference in a new issue