mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-15 03:03:50 +00:00
Fixed: font cell of a CPTableView comes black when editing another cell
Previously, when editing a cell, the other cells of the tableView lost the themeState of the firstResponder. Now the other cells, as the tableView, keep this state when a cell is editing. Fixed #2133
This commit is contained in:
1 parent
1e1297378c
commit
c64e5a5799
3 files changed
+8
-2
No files matched your search
@@ -5143,12 +5143,18 @@ Your delegate can implement this method to avoid subclassing the tableview to ad
|
||||
{
|
||||
_editingRow = CPNotFound;
|
||||
_editingColumn = CPNotFound;
|
||||
|
||||
// This is needed to unset the themeState firstResponder of the tableView
|
||||
[self _notifyViewDidResignFirstResponder];
|
||||
return;
|
||||
}
|
||||
|
||||
_editingRow = [self rowForView:responder];
|
||||
_editingColumn = [self columnForView:responder];
|
||||
|
||||
// This is needed to set the themeState firstResponder of the tableView
|
||||
[self _notifyViewDidBecomeFirstResponder];
|
||||
|
||||
if (_editingRow !== CPNotFound && [responder isKindOfClass:[CPTextField class]] && ![responder isBezeled])
|
||||
{
|
||||
[responder setBezeled:YES];
|
||||
|
||||
@@ -987,7 +987,7 @@ var themedButtonValues = nil,
|
||||
[@"content-inset", CGInsetMake(3.0, 3.0, 3.0, 5.0), CPThemeStateTableDataView],
|
||||
|
||||
[@"text-color", [CPColor colorWithCalibratedWhite:51.0 / 255.0 alpha:1.0], CPThemeStateTableDataView],
|
||||
[@"text-color", [CPColor whiteColor], [CPThemeStateTableDataView, CPThemeStateSelectedDataView, CPThemeStateKeyWindow]],
|
||||
[@"text-color", [CPColor whiteColor], [CPThemeStateTableDataView, CPThemeStateSelectedDataView, CPThemeStateFirstResponder,CPThemeStateKeyWindow]],
|
||||
[@"font", [CPFont systemFontOfSize:CPFontCurrentSystemSize], [CPThemeStateTableDataView, CPThemeStateSelectedDataView]],
|
||||
[@"text-color", [CPColor blackColor], [CPThemeStateTableDataView, CPThemeStateEditable]],
|
||||
[@"text-color", [CPColor blackColor], [CPThemeStateTableDataView, CPThemeStateSelectedDataView, CPThemeStateEditing]],
|
||||
|
||||
@@ -559,7 +559,7 @@ var themedButtonValues = nil,
|
||||
[@"content-inset", CGInsetMake(0.0, 0.0, 0.0, 5.0), CPThemeStateTableDataView],
|
||||
|
||||
[@"text-color", [CPColor colorWithCalibratedWhite:51.0 / 255.0 alpha:1.0], CPThemeStateTableDataView],
|
||||
[@"text-color", [CPColor whiteColor], [CPThemeStateTableDataView, CPThemeStateSelectedDataView, CPThemeStateKeyWindow]],
|
||||
[@"text-color", [CPColor whiteColor], [CPThemeStateTableDataView, CPThemeStateSelectedDataView, CPThemeStateFirstResponder, CPThemeStateKeyWindow]],
|
||||
[@"font", [CPFont systemFontOfSize:CPFontCurrentSystemSize], [CPThemeStateTableDataView, CPThemeStateSelectedDataView]],
|
||||
[@"text-color", [CPColor blackColor], [CPThemeStateTableDataView, CPThemeStateEditing, CPThemeStateFirstResponder, CPThemeStateKeyWindow]],
|
||||
[@"text-color", [CPColor blackColor], [CPThemeStateTableDataView, CPThemeStateSelectedDataView, CPThemeStateEditable, CPThemeStateFirstResponder, CPThemeStateKeyWindow]],
|
||||
|
||||
Reference in new issue
Block a user