mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 13:10:59 +00:00
Drawing fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3657 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3af798bd4f
commit
dc118a4c3c
3 changed files with 18 additions and 19 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Feb 4 9:35:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSScroller.m: More fixes by Benhur-de-Oliveira.Stein@imag.fr
|
||||
* Source/NSClipView.m: ditto
|
||||
|
||||
Thu Feb 4 9:35:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Tools/dummy.m: renamed to Functions.m
|
||||
|
@ -5,7 +10,7 @@ Thu Feb 4 9:35:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
|||
* Tools/GNUmakefile: updated dummy.m to Functions.m
|
||||
* Source/NSApplication.m: Fixed to update all only when necessary.
|
||||
* Source/NSWindow.m: Fix to tell application when update required.
|
||||
The following files revised by ...
|
||||
The following files revised by Benhur-de-Oliveira.Stein@imag.fr
|
||||
* Source/NSScroller.m: Drawing fixes
|
||||
* Source/NSScrollView.m: Drawing fixes
|
||||
* Source/NSClipViem.m: Drawing fixes
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
[super init];
|
||||
[self setAutoresizesSubviews:YES];
|
||||
[self setBackgroundColor:[NSColor lightGrayColor]];
|
||||
_copiesOnScroll = YES;
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -113,8 +114,6 @@
|
|||
if (NSEqualPoints(originalBounds.origin, newBounds.origin))
|
||||
return;
|
||||
|
||||
// [self setBoundsOrigin: newBounds.origin];
|
||||
|
||||
if (_copiesOnScroll)
|
||||
{
|
||||
// copy the portion of the view that is common before and after scrolling.
|
||||
|
@ -123,9 +122,10 @@
|
|||
intersection = NSIntersectionRect(originalBounds, newBounds);
|
||||
if (NSEqualRects(intersection, NSZeroRect))
|
||||
{
|
||||
// no intersection -- docview should draw everyting
|
||||
// no intersection -- docview should draw everything
|
||||
[self setBoundsOrigin: newBounds.origin];
|
||||
[_documentView setNeedsDisplayInRect: newBounds];
|
||||
[_documentView setNeedsDisplayInRect:
|
||||
[self convertRect: newBounds toView: _documentView]];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -160,7 +160,8 @@
|
|||
redrawRect.origin.x = newBounds.origin.x
|
||||
+ intersection.size.width;
|
||||
}
|
||||
[_documentView setNeedsDisplayInRect: redrawRect];
|
||||
[_documentView setNeedsDisplayInRect:
|
||||
[self convertRect: redrawRect toView: _documentView]];
|
||||
}
|
||||
|
||||
if (dy != 0)
|
||||
|
@ -184,7 +185,8 @@
|
|||
redrawRect.origin.y = newBounds.origin.y
|
||||
+ intersection.size.height;
|
||||
}
|
||||
[_documentView setNeedsDisplayInRect: redrawRect];
|
||||
[_documentView setNeedsDisplayInRect:
|
||||
[self convertRect: redrawRect toView: _documentView]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -192,7 +194,8 @@
|
|||
{
|
||||
// dont copy anything -- docview draws it all
|
||||
[self setBoundsOrigin: newBounds.origin];
|
||||
[_documentView setNeedsDisplayInRect: newBounds];
|
||||
[_documentView setNeedsDisplayInRect:
|
||||
[self convertRect: newBounds toView: _documentView]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -520,18 +520,9 @@ static BOOL preCalcValues = NO;
|
|||
float oldFloatValue = _floatValue;
|
||||
float floatValue;
|
||||
NSDate *theDistantFuture = [NSDate distantFuture];
|
||||
PSMatrix* matrix;
|
||||
NSEventType eventType;
|
||||
NSRect knobRect = {{0,0},{0,0}};
|
||||
int periodCount = 0; // allows a forced update
|
||||
NSMutableArray* path = [self _pathBetweenSubview: self
|
||||
toSuperview: [window contentView]];
|
||||
|
||||
[path addObject: [window contentView]];
|
||||
matrix = [self _concatenateMatricesInReverseOrderFromPath: path];
|
||||
[matrix inverse];
|
||||
|
||||
//fprintf(stderr, " trackKnob \n");
|
||||
|
||||
[self _preCalcParts]; // pre calc scroller parts
|
||||
preCalcValues = YES;
|
||||
|
@ -546,7 +537,7 @@ static BOOL preCalcValues = NO;
|
|||
if (eventType != NSPeriodic)
|
||||
{
|
||||
apoint = [theEvent locationInWindow];
|
||||
// zero the periodic count whenever a real position event is recieved
|
||||
// zero the periodic count whenever a real position event is received
|
||||
periodCount = 0;
|
||||
}
|
||||
else
|
||||
|
@ -556,7 +547,7 @@ static BOOL preCalcValues = NO;
|
|||
if (periodCount == 6)
|
||||
apoint = [window mouseLocationOutsideOfEventStream];
|
||||
|
||||
point = [matrix pointInMatrixSpace: apoint];
|
||||
point = [self convertPoint:apoint fromView:nil];
|
||||
|
||||
if (point.x != knobRect.origin.x || point.y != knobRect.origin.y)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue