mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Add direct check if the mouse is inside the cellFrame.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26021 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
50654211f6
commit
40833fa7e5
2 changed files with 14 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-02-03 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSButtonCell.m
|
||||
(-_drawBorderAndBackgroundWithFrame:inView:): Add direct check if
|
||||
the mouse is inside the cellFrame.
|
||||
|
||||
2008-02-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSTableHeaderCell.m,
|
||||
|
|
|
@ -922,10 +922,16 @@ typedef struct _GSButtonCellFlags
|
|||
}
|
||||
|
||||
// Private helper method overridden in subclasses
|
||||
- (void) _drawBorderAndBackgroundWithFrame: (NSRect)cellFrame inView: (NSView*)controlView
|
||||
- (void) _drawBorderAndBackgroundWithFrame: (NSRect)cellFrame
|
||||
inView: (NSView*)controlView
|
||||
{
|
||||
// The inside check could also be done via a track rect, but then this would
|
||||
// only work with specially prepared controls. Therefore we dont use
|
||||
// _mouse_inside here.
|
||||
if ((_cell.is_bordered)
|
||||
&& (!_shows_border_only_while_mouse_inside || _mouse_inside))
|
||||
&& (!_shows_border_only_while_mouse_inside
|
||||
|| [controlView mouse: [[controlView window] mouseLocationOutsideOfEventStream]
|
||||
inRect: cellFrame]))
|
||||
{
|
||||
[self drawBezelWithFrame: cellFrame inView: controlView];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue