mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-21 12:11:29 +00:00
Fix translation of scrolling document bounds
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8042 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
84b1d15848
commit
144ab50f30
3 changed files with 17 additions and 2 deletions
|
@ -1,3 +1,11 @@
|
|||
2000-11-05 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/NSScreen.m (+mainScreen): Make the mainScreen a shared
|
||||
instance.
|
||||
|
||||
* Source/NSClipView.m (-setBoundsOrigin:): If our documentView is
|
||||
focused, translate the PS context to the new bounds.
|
||||
|
||||
2000-11-05 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/gnustep/gui/NSClipView.h:
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <AppKit/NSColor.h>
|
||||
#include <AppKit/NSWindow.h>
|
||||
#include <AppKit/NSGraphics.h>
|
||||
#include <AppKit/PSOperators.h>
|
||||
|
||||
@implementation NSClipView
|
||||
|
||||
|
@ -213,6 +214,9 @@
|
|||
[self convertRect: newBounds toView: _documentView]];
|
||||
}
|
||||
|
||||
if ([NSView focusView] == _documentView)
|
||||
PStranslate(NSMinX(originalBounds)-point.x, NSMinY(originalBounds)-point.y);
|
||||
|
||||
[_super_view reflectScrolledClipView: self];
|
||||
}
|
||||
|
||||
|
|
|
@ -247,11 +247,14 @@ _screenNumbers(int *count)
|
|||
}
|
||||
}
|
||||
|
||||
static NSScreen *mainScreen = nil;
|
||||
|
||||
// Creating NSScreen Instances
|
||||
+ (NSScreen*) mainScreen
|
||||
{
|
||||
int *windows = 0, count;
|
||||
NSScreen *mainScreen = nil;
|
||||
if (mainScreen)
|
||||
return mainScreen;
|
||||
|
||||
// Initialize the window list.
|
||||
windows = _screenNumbers(&count);
|
||||
|
@ -264,7 +267,7 @@ _screenNumbers(int *count)
|
|||
mainScreen = [[NSScreen alloc] _initWithScreenNumber: windows[0]];
|
||||
NSZoneFree(NSDefaultMallocZone(), windows); // free the list
|
||||
|
||||
return AUTORELEASE(mainScreen);
|
||||
return mainScreen;
|
||||
}
|
||||
|
||||
+ (NSScreen*) deepestScreen
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue