NSCell, NSClipView and NSCollectionView merges

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@38707 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Marcian Lytwyn 2015-06-26 18:05:15 +00:00
parent dd460d8235
commit 5e8e285254
3 changed files with 8 additions and 7 deletions

View file

@ -1791,6 +1791,7 @@ static NSColor *dtxtCol;
return NO; // Otherwise return NO return NO; // Otherwise return NO
} }
// Testplant-MAL-2015-06-26: Keeping testplant fixes for this method...
- (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView - (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame ofView:(NSView *)controlView
{ {
NSUInteger hitResult = NSCellHitNone; NSUInteger hitResult = NSCellHitNone;
@ -2317,7 +2318,7 @@ static NSColor *dtxtCol;
_cell.shows_first_responder = YES; _cell.shows_first_responder = YES;
_cell.in_editing = YES; _cell.in_editing = YES;
#if 1 #if 0
// Testplant-MAL-2015-06-20: merging removal causes focus ring issues... // Testplant-MAL-2015-06-20: merging removal causes focus ring issues...
// FIXME: we need to draw the focus ring, this works but // FIXME: we need to draw the focus ring, this works but
// there's something wrong about telling the view to come // there's something wrong about telling the view to come

View file

@ -180,6 +180,7 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
df = [_documentView frame]; df = [_documentView frame];
[self setBoundsOrigin: df.origin]; [self setBoundsOrigin: df.origin];
// Testplant-MAL-2015-06-26: Keeping testplant fixes...
if ([aView respondsToSelector: @selector(backgroundColor)]) if ([aView respondsToSelector: @selector(backgroundColor)])
{ {
[self setBackgroundColor: [(id)aView backgroundColor]]; [self setBackgroundColor: [(id)aView backgroundColor]];
@ -239,15 +240,15 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
- (void) setBounds: (NSRect)b - (void) setBounds: (NSRect)b
{ {
// FIXME: Shouldn't the document view be marked as needing a redraw?
[super setBounds: b]; [super setBounds: b];
[self setNeedsDisplay: YES];
[_super_view reflectScrolledClipView: self]; [_super_view reflectScrolledClipView: self];
} }
- (void) setBoundsSize: (NSSize)aSize - (void) setBoundsSize: (NSSize)aSize
{ {
// FIXME: Shouldn't the document view be marked as needing a redraw?
[super setBoundsSize: aSize]; [super setBoundsSize: aSize];
[self setNeedsDisplay: YES];
[_super_view reflectScrolledClipView: self]; [_super_view reflectScrolledClipView: self];
} }
@ -275,8 +276,6 @@ static inline NSRect integralRect (NSRect rect, NSView *view)
scrolling. Then, document view needs to redraw the remaining scrolling. Then, document view needs to redraw the remaining
areas. */ areas. */
/* Common part - which is a first approx of what we could /* Common part - which is a first approx of what we could
copy... */ copy... */
intersection = NSIntersectionRect (originalBounds, newBounds); intersection = NSIntersectionRect (originalBounds, newBounds);

View file

@ -166,6 +166,7 @@ static NSString *placeholderItem = nil;
{ {
// Calling itemAtIndex: will eventually instantiate the collection view item, // Calling itemAtIndex: will eventually instantiate the collection view item,
// if it hasn't been done already. // if it hasn't been done already.
// Testplant-MAL-2015-06-26: Keeping testplant fixes...
if (index < [_items count]) if (index < [_items count])
{ {
NSCollectionViewItem *collectionItem = [self itemAtIndex: index]; NSCollectionViewItem *collectionItem = [self itemAtIndex: index];
@ -476,6 +477,7 @@ static NSString *placeholderItem = nil;
{ {
[item setSelected: YES]; [item setSelected: YES];
} }
// Testplant-MAL-2015-06-26: Keeping testplant fixes...
// Frank LeGrand 4/25/13: // Frank LeGrand 4/25/13:
// We set this initial rect as a workaround for a weird display // We set this initial rect as a workaround for a weird display
// issue in our app where the item view would get drawn in front // issue in our app where the item view would get drawn in front
@ -527,7 +529,7 @@ static NSString *placeholderItem = nil;
return; return;
CGFloat width = [self bounds].size.width; CGFloat width = [self bounds].size.width;
//NSLog(@"tile: width = %g, previous width = %g", width, _tileWidth); // Testplant-MAL-2015-06-26: Keeping testplant fixes...
if (isnan(width) || ABS(width - _tileWidth) <= 1) if (isnan(width) || ABS(width - _tileWidth) <= 1)
return; return;
@ -602,7 +604,6 @@ static NSString *placeholderItem = nil;
NSSize currentSize = [self frame].size; NSSize currentSize = [self frame].size;
if (!NSEqualSizes(currentSize, aSize)) if (!NSEqualSizes(currentSize, aSize))
{ {
//NSLog(@"resizeSubviews: new size = %g x %g, currentSize = %g x %g", aSize.width, aSize.height, currentSize.width, currentSize.height);
[self tile]; [self tile];
} }
} }