mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-26 09:51:07 +00:00
Corrected and cleaned up focus ring drawing for cell classes.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@24924 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2901859f81
commit
f63c0258d2
6 changed files with 40 additions and 18 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2007-03-22 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/NSButtonCell.m (-drawWithFrame:inView:),
|
||||||
|
* Source/NSCell.m (-drawWithFrame:inView:): Respect focus ring
|
||||||
|
style when drawing first responder state.
|
||||||
|
* Source/NSBrowserCell.m (-drawInteriorWithFrame:inView:),
|
||||||
|
* Source/NSPopupButtonCell.m (-drawInteriorWithFrame:inView:),
|
||||||
|
* Source/NSImageCell.m (-drawInteriorWithFrame:inView:): Don't
|
||||||
|
draw focus ring.
|
||||||
|
|
||||||
2007-03-22 Richard Frith-Macdonald <rfm@gnu.org>
|
2007-03-22 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSAffineTransform.m: Avoid accessing internals of the base
|
* Source/NSAffineTransform.m: Avoid accessing internals of the base
|
||||||
|
|
|
@ -323,9 +323,6 @@ static NSFont *_leafFont;
|
||||||
// Draw the body of the cell
|
// Draw the body of the cell
|
||||||
[self _drawAttributedText: [self attributedStringValue]
|
[self _drawAttributedText: [self attributedStringValue]
|
||||||
inFrame: title_rect];
|
inFrame: title_rect];
|
||||||
|
|
||||||
if (_cell.shows_first_responder == YES)
|
|
||||||
NSDottedFrameRect(cellFrame);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL) isOpaque
|
- (BOOL) isOpaque
|
||||||
|
|
|
@ -948,9 +948,21 @@ typedef struct _GSButtonCellFlags
|
||||||
if (_cell.shows_first_responder
|
if (_cell.shows_first_responder
|
||||||
&& [[controlView window] firstResponder] == controlView)
|
&& [[controlView window] firstResponder] == controlView)
|
||||||
{
|
{
|
||||||
// FIXME: Should depend on _cell.focus_ring_type
|
switch (_cell.focus_ring_type)
|
||||||
[[GSTheme theme] drawFocusFrame: [self drawingRectForBounds: cellFrame]
|
{
|
||||||
view: controlView];
|
case NSFocusRingTypeDefault:
|
||||||
|
[[GSTheme theme] drawFocusFrame: [self drawingRectForBounds:
|
||||||
|
cellFrame]
|
||||||
|
view: controlView];
|
||||||
|
break;
|
||||||
|
case NSFocusRingTypeExterior:
|
||||||
|
[[GSTheme theme] drawFocusFrame: cellFrame
|
||||||
|
view: controlView];
|
||||||
|
break;
|
||||||
|
case NSFocusRingTypeNone:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2019,9 +2019,21 @@ static NSColor *shadowCol;
|
||||||
if (_cell.shows_first_responder
|
if (_cell.shows_first_responder
|
||||||
&& [[controlView window] firstResponder] == controlView)
|
&& [[controlView window] firstResponder] == controlView)
|
||||||
{
|
{
|
||||||
// FIXME: Should depend on _cell.focus_ring_type
|
switch (_cell.focus_ring_type)
|
||||||
[[GSTheme theme] drawFocusFrame: [self drawingRectForBounds: cellFrame]
|
{
|
||||||
view: controlView];
|
case NSFocusRingTypeDefault:
|
||||||
|
[[GSTheme theme] drawFocusFrame: [self drawingRectForBounds:
|
||||||
|
cellFrame]
|
||||||
|
view: controlView];
|
||||||
|
break;
|
||||||
|
case NSFocusRingTypeExterior:
|
||||||
|
[[GSTheme theme] drawFocusFrame: cellFrame
|
||||||
|
view: controlView];
|
||||||
|
break;
|
||||||
|
case NSFocusRingTypeNone:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -301,9 +301,6 @@ scaleProportionally(NSSize imageSize, NSRect canvasRect)
|
||||||
realImageSize.height)
|
realImageSize.height)
|
||||||
operation: NSCompositeSourceOver
|
operation: NSCompositeSourceOver
|
||||||
fraction: 1.0];
|
fraction: 1.0];
|
||||||
|
|
||||||
if (_cell.shows_first_responder)
|
|
||||||
NSDottedFrameRect(cellFrame);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSSize) cellSize
|
- (NSSize) cellSize
|
||||||
|
|
|
@ -888,12 +888,6 @@ static NSImage *_pbc_image[2];
|
||||||
[self calcSize];
|
[self calcSize];
|
||||||
[super drawInteriorWithFrame: cellFrame inView: controlView];
|
[super drawInteriorWithFrame: cellFrame inView: controlView];
|
||||||
|
|
||||||
if (_cell.shows_first_responder)
|
|
||||||
{
|
|
||||||
cellFrame = [self drawingRectForBounds: cellFrame];
|
|
||||||
NSDottedFrameRect(cellFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Unset the item to restore balance if a new was created */
|
/* Unset the item to restore balance if a new was created */
|
||||||
if (new)
|
if (new)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue