mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 16:20:38 +00:00
Implemented focus rings around cell so editable cells in a NSTableView appear by default with a focus ring when being edited. Some minor adjustments will be required to make it work perfectly with other controls, such as NSMatrix, NSForm, and NSPopUpButton.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/branches/gnustep_testplant_branch@36066 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
21e571b923
commit
bca3428387
6 changed files with 73 additions and 18 deletions
|
@ -968,7 +968,11 @@ static NSImage *unexpandable = nil;
|
|||
tb = [_tableColumns objectAtIndex: i];
|
||||
cell = [self _dataCellForTableColumn: tb row: rowIndex];
|
||||
if (i == _editedColumn && rowIndex == _editedRow)
|
||||
[cell _setInEditing: YES];
|
||||
{
|
||||
[cell _setInEditing: YES];
|
||||
[cell setShowsFirstResponder:YES];
|
||||
[cell setFocusRingType:NSFocusRingTypeDefault];
|
||||
}
|
||||
[self _willDisplayCell: cell
|
||||
forTableColumn: tb
|
||||
row: rowIndex];
|
||||
|
@ -1035,7 +1039,11 @@ static NSImage *unexpandable = nil;
|
|||
|
||||
[cell drawWithFrame: drawingRect inView: self];
|
||||
if (i == _editedColumn && rowIndex == _editedRow)
|
||||
[cell _setInEditing: NO];
|
||||
{
|
||||
[cell _setInEditing: NO];
|
||||
[cell setShowsFirstResponder:NO];
|
||||
[cell setFocusRingType:NSFocusRingTypeDefault];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1613,8 +1621,7 @@ Also returns the child index relative to this parent. */
|
|||
}
|
||||
|
||||
_textObject = [_editedCell setUpFieldEditorAttributes: t];
|
||||
// FIXME: Which background color do we want here?
|
||||
[_textObject setBackgroundColor: [NSColor selectedControlColor]];
|
||||
[_textObject setBackgroundColor: [NSColor textBackgroundColor]];
|
||||
[_textObject setDrawsBackground: YES];
|
||||
|
||||
drawingRect = [self frameOfCellAtColumn: columnIndex row: rowIndex];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue