Fixed uiTable selection colors on OS X.
This commit is contained in:
parent
93923bbcb3
commit
a82835fff3
|
@ -4,7 +4,6 @@
|
||||||
// TODOs
|
// TODOs
|
||||||
// - can't seem to grow the table view vertically beyond a certain height
|
// - can't seem to grow the table view vertically beyond a certain height
|
||||||
// - header cell seems off
|
// - header cell seems off
|
||||||
// - text view cell parts don't change color when selected
|
|
||||||
|
|
||||||
@interface tableModel : NSObject<NSTableViewDataSource, NSTableViewDelegate> {
|
@interface tableModel : NSObject<NSTableViewDataSource, NSTableViewDelegate> {
|
||||||
uiTableModel *libui_m;
|
uiTableModel *libui_m;
|
||||||
|
@ -75,13 +74,13 @@ struct uiTable {
|
||||||
|
|
||||||
- (NSView *)tableView:(NSTableView *)tv viewForTableColumn:(NSTableColumn *)cc row:(NSInteger)row
|
- (NSView *)tableView:(NSTableView *)tv viewForTableColumn:(NSTableColumn *)cc row:(NSInteger)row
|
||||||
{
|
{
|
||||||
NSView *v;
|
NSTableCellView *v;
|
||||||
tableColumn *c = (tableColumn *) cc;
|
tableColumn *c = (tableColumn *) cc;
|
||||||
tablePart *part;
|
tablePart *part;
|
||||||
NSMutableArray *views;
|
NSMutableArray *views;
|
||||||
NSView *view, *prev;
|
NSView *view, *prev;
|
||||||
|
|
||||||
v = [[NSView alloc] initWithFrame:NSZeroRect];
|
v = [[NSTableCellView alloc] initWithFrame:NSZeroRect];
|
||||||
|
|
||||||
views = [NSMutableArray new];
|
views = [NSMutableArray new];
|
||||||
for (part in c.libui_col->parts)
|
for (part in c.libui_col->parts)
|
||||||
|
@ -93,6 +92,7 @@ struct uiTable {
|
||||||
prev = nil;
|
prev = nil;
|
||||||
for (view in views) {
|
for (view in views) {
|
||||||
[v addSubview:view];
|
[v addSubview:view];
|
||||||
|
// TODO set [v imageView] and [v textField] as appropriate?
|
||||||
if (prev == nil) { // first view
|
if (prev == nil) { // first view
|
||||||
[v addConstraint:mkConstraint(v, NSLayoutAttributeLeading,
|
[v addConstraint:mkConstraint(v, NSLayoutAttributeLeading,
|
||||||
NSLayoutRelationEqual,
|
NSLayoutRelationEqual,
|
||||||
|
|
Loading…
Reference in New Issue