mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 02:00:48 +00:00
Handle correctly the mouse cursor in NSSearchField.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36595 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
93e8ef8ada
commit
ba3be347fb
2 changed files with 24 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-05-06 German A. Arias <german@xelalug.org>
|
||||||
|
|
||||||
|
* Source/NSSearchFieldCell.m: Add method -resetCursorRect:inView: and an
|
||||||
|
inline method to handle correctly the mouse cursor.
|
||||||
|
|
||||||
2013-04-24 05:23-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
2013-04-24 05:23-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
* Headers/AppKit/NSPopover.h: correct delegate method
|
* Headers/AppKit/NSPopover.h: correct delegate method
|
||||||
|
|
|
@ -59,6 +59,19 @@
|
||||||
|
|
||||||
@implementation NSSearchFieldCell
|
@implementation NSSearchFieldCell
|
||||||
|
|
||||||
|
#define ICON_WIDTH 16
|
||||||
|
|
||||||
|
// Inlined method
|
||||||
|
|
||||||
|
static inline NSRect textCellFrameFromRect(NSRect cellRect)
|
||||||
|
// Not the drawed part, precises just the part which receives events
|
||||||
|
{
|
||||||
|
return NSMakeRect(cellRect.origin.x + ICON_WIDTH,
|
||||||
|
NSMinY(cellRect),
|
||||||
|
NSWidth(cellRect) - 2*ICON_WIDTH,
|
||||||
|
NSHeight(cellRect));
|
||||||
|
}
|
||||||
|
|
||||||
- (id) initTextCell:(NSString *)aString
|
- (id) initTextCell:(NSString *)aString
|
||||||
{
|
{
|
||||||
self = [super initTextCell: aString];
|
self = [super initTextCell: aString];
|
||||||
|
@ -306,8 +319,6 @@
|
||||||
[c setKeyEquivalentModifierMask: 0];
|
[c setKeyEquivalentModifierMask: 0];
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ICON_WIDTH 16
|
|
||||||
|
|
||||||
- (NSRect) cancelButtonRectForBounds: (NSRect)rect
|
- (NSRect) cancelButtonRectForBounds: (NSRect)rect
|
||||||
{
|
{
|
||||||
NSRect part, clear;
|
NSRect part, clear;
|
||||||
|
@ -442,6 +453,12 @@
|
||||||
untilMouseUp: untilMouseUp];
|
untilMouseUp: untilMouseUp];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) resetCursorRect: (NSRect)cellFrame inView: (NSView *)controlView
|
||||||
|
{
|
||||||
|
[super resetCursorRect: textCellFrameFromRect(cellFrame)
|
||||||
|
inView: controlView];
|
||||||
|
}
|
||||||
|
|
||||||
- (void) textDidChange: (NSNotification *)notification
|
- (void) textDidChange: (NSNotification *)notification
|
||||||
{
|
{
|
||||||
NSText *textObject;
|
NSText *textObject;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue