mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 00:30:49 +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
6212a911c4
commit
6c78246b0a
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>
|
2008-02-02 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSTableHeaderCell.m,
|
* Source/NSTableHeaderCell.m,
|
||||||
|
|
|
@ -922,10 +922,16 @@ typedef struct _GSButtonCellFlags
|
||||||
}
|
}
|
||||||
|
|
||||||
// Private helper method overridden in subclasses
|
// 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)
|
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];
|
[self drawBezelWithFrame: cellFrame inView: controlView];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue