mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 20:30:47 +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
d4dff12435
commit
c5b6909179
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>
|
2013-09-28 Eric Wasylishen <ewasylishen@gmail.com>
|
||||||
|
|
||||||
* Source/GSTheme.m:
|
* Source/GSTheme.m:
|
||||||
|
|
|
@ -199,6 +199,9 @@ static GSAutocompleteWindow *gsWindow = nil;
|
||||||
NSRect rect;
|
NSRect rect;
|
||||||
NSRect stringRect;
|
NSRect stringRect;
|
||||||
NSPoint point;
|
NSPoint point;
|
||||||
|
NSInterfaceStyle style;
|
||||||
|
|
||||||
|
style = NSInterfaceStyleForKey(@"NSScrollViewInterfaceStyle", nil);
|
||||||
|
|
||||||
rect = [self frame];
|
rect = [self frame];
|
||||||
screenFrame = [[[_textView window] screen] frame];
|
screenFrame = [[[_textView window] screen] frame];
|
||||||
|
@ -211,7 +214,15 @@ static GSAutocompleteWindow *gsWindow = nil;
|
||||||
[_textView convertRect: stringRect toView: nil].origin];
|
[_textView convertRect: stringRect toView: nil].origin];
|
||||||
|
|
||||||
// Calculate the origin point to the window.
|
// 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;
|
rect.origin.y = point.y - rect.size.height;
|
||||||
|
|
||||||
// If part of the window is off screen, change the origin point.
|
// If part of the window is off screen, change the origin point.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue