mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +00:00
[qwaq] Set table cell size in the correct place
I have no idea why I made LocalsData set the size instead of TableView, but now the cells are correctly sized automatically.
This commit is contained in:
parent
2119688b48
commit
1a5cce4374
2 changed files with 5 additions and 2 deletions
|
@ -139,7 +139,6 @@ free_defs (LocalsData *self)
|
||||||
int r = row - *index;
|
int r = row - *index;
|
||||||
view = [dv viewAtRow: r forColumn:column];
|
view = [dv viewAtRow: r forColumn:column];
|
||||||
}
|
}
|
||||||
[view resizeTo:{[column width], 1}];
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,6 +100,7 @@
|
||||||
self.dataSource = [dataSource retain];
|
self.dataSource = [dataSource retain];
|
||||||
[[dataSource onRowCountChanged] addListener:self
|
[[dataSource onRowCountChanged] addListener:self
|
||||||
:@selector(onRowCountChanged:)];
|
:@selector(onRowCountChanged:)];
|
||||||
|
[vScrollBar setRange:[dataSource numberOfRows:self]];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,7 +136,10 @@
|
||||||
}
|
}
|
||||||
col = [columns objectAtIndex:i];
|
col = [columns objectAtIndex:i];
|
||||||
cell = [dataSource tableView:self forColumn:col row:row];
|
cell = [dataSource tableView:self forColumn:col row:row];
|
||||||
[[[cell setContext:buffer] moveTo:{x, y}] draw];
|
[[[[cell setContext:buffer]
|
||||||
|
moveTo:{x, y}]
|
||||||
|
resizeTo:{[col width], 1}]
|
||||||
|
draw];
|
||||||
x += [col width];
|
x += [col width];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue