GUI updates

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4928 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 1999-09-21 15:42:14 +00:00
parent 98a649c60a
commit 7c09fe33ca
3 changed files with 32 additions and 54 deletions

View file

@ -1,3 +1,12 @@
1999-09-21 Adam Fedor <fedor@gnu.org>
* Source/NSBrowserCell.m (-drawInteriorWithFrame:inView:): Put
arrow at extreme right of cell (patch from Tim Bissell
<tim_bissell@yahoo.co.uk>).
* Source/NSButtonsCell.m (-performClick:) Remove (duplicate of
NSCell method).
Tue Sep 15 1999 Nicola Pero <n.pero@mi.flashnet.it> Tue Sep 15 1999 Nicola Pero <n.pero@mi.flashnet.it>
(NB. The above date reflects submission of the patch - sorry I didn't (NB. The above date reflects submission of the patch - sorry I didn't

View file

@ -283,12 +283,6 @@ static Class colorClass;
if (!_isLeaf) if (!_isLeaf)
{ {
image = _highlightBranchImage; image = _highlightBranchImage;
image_rect.size.height = cellFrame.size.height;
image_rect.size.width = image_rect.size.height;
// Right justify
image_rect.origin.x += cellFrame.size.width - image_rect.size.width;
image_rect.origin.y
= MAX(NSMidY(image_rect) - ([image size].height/2.),0.);
} }
else else
image_rect = NSZeroRect; image_rect = NSZeroRect;
@ -300,16 +294,17 @@ static Class colorClass;
if (!_isLeaf) if (!_isLeaf)
{ {
image = _branchImage; image = _branchImage;
image_rect.size.height = cellFrame.size.height;
image_rect.size.width = image_rect.size.height;
// Right justify
image_rect.origin.x += cellFrame.size.width - image_rect.size.width;
image_rect.origin.y
= MAX(NSMidY(image_rect) - ([image size].height/2.),0.);
} }
else else
image_rect = NSZeroRect; image_rect = NSZeroRect;
} }
image_rect.size = [image size];
// Right justify
image_rect.origin.x += cellFrame.size.width - image_rect.size.width - 1.0;
image_rect.origin.y += (cellFrame.size.height - image_rect.size.height) / 2.0;
//MAX(NSMidY(image_rect) - ([image size].height/2.),0.);
NSRectFill(cellFrame); // Clear the background NSRectFill(cellFrame); // Clear the background
title_rect.size.width -= image_rect.size.width + 4; // draw the title cell title_rect.size.width -= image_rect.size.width + 4; // draw the title cell
@ -343,13 +338,13 @@ static Class colorClass;
NSPoint location = [controlView convertPoint: [theEvent locationInWindow] NSPoint location = [controlView convertPoint: [theEvent locationInWindow]
fromView: nil]; fromView: nil];
fprintf(stderr, " NSBrowserCell: editWithFrame --- "); NSDebugLog(@" NSBrowserCell: editWithFrame --- ");
[_browserText _setCursorLocation: location]; [_browserText _setCursorLocation: location];
[_browserText _setCursorVisibility: YES]; [_browserText _setCursorVisibility: YES];
if ([[controlView window] makeFirstResponder: controlView]) if ([[controlView window] makeFirstResponder: controlView])
fprintf(stderr, " XRBrowserCell: we are now first responder --- "); NSDebugLog(@" NSBrowserCell: we are now first responder --- ");
[self drawInteriorWithFrame: aRect inView: controlView]; [self drawInteriorWithFrame: aRect inView: controlView];
} }
@ -361,7 +356,7 @@ fprintf(stderr, " NSBrowserCell: editWithFrame --- ");
- (void) _handleKeyEvent: (NSEvent*)keyEvent - (void) _handleKeyEvent: (NSEvent*)keyEvent
{ {
fprintf(stderr, " NSBrowserCell: _handleKeyEvent --- "); NSDebugLog(@" NSBrowserCell: _handleKeyEvent --- ");
[_browserText _handleKeyEvent: keyEvent]; [_browserText _handleKeyEvent: keyEvent];

View file

@ -183,32 +183,6 @@
[self setContinuous: YES]; [self setContinuous: YES];
} }
- (void) performClick: (id)sender
{
NSView *cv;
if (control_view)
cv = control_view;
else
cv = [NSView focusView];
[self highlight: YES withFrame: [cv frame] inView: cv];
if (action)
{
NS_DURING
{
[(NSControl*)cv sendAction: action to: target];
}
NS_HANDLER
{
[self highlight: NO withFrame: [cv frame] inView: cv];
[localException raise];
}
NS_ENDHANDLER
}
[self highlight: NO withFrame: [cv frame] inView: cv];
}
// //
// Setting the Key Equivalent // Setting the Key Equivalent
// //