diff options
| author | Pietro Gagliardi <[email protected]> | 2014-04-05 15:10:02 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-04-05 15:10:02 -0400 |
| commit | da68adf420b2360c71a12fcb50d842e3a23ee467 (patch) | |
| tree | b6dd3bfe0204ed487c243449efd4ec3235d5f2e5 /listbox_darwin.go | |
| parent | 612eba9de3c9223cf4da20578255b5496c79fd41 (diff) | |
Gave controls their proper fonts on Mac OS X.
Diffstat (limited to 'listbox_darwin.go')
| -rw-r--r-- | listbox_darwin.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/listbox_darwin.go b/listbox_darwin.go index da2a0af..bf05b3c 100644 --- a/listbox_darwin.go +++ b/listbox_darwin.go @@ -161,6 +161,8 @@ var ( _initWithIdentifier = sel_getUid("initWithIdentifier:") _tableColumnWithIdentifier = sel_getUid("tableColumnWithIdentifier:") + _dataCell = sel_getUid("dataCell") + _setDataCell = sel_getUid("setDataCell:") // _setEditable in sysdata_darwin.go ) @@ -168,6 +170,10 @@ func newListboxTableColumn() C.id { column := C.objc_msgSend_noargs(_NSTableColumn, _alloc) column = C.objc_msgSend_id(column, _initWithIdentifier, listboxItemKey) C.objc_msgSend_bool(column, _setEditable, C.BOOL(C.NO)) + // to set the font for each item, we set the font of the "data cell", which is more aptly called the "cell template" + dataCell := C.objc_msgSend_noargs(column, _dataCell) + applyStandardControlFont(dataCell) + C.objc_msgSend_id(column, _setDataCell, dataCell) // TODO other properties? bindListboxArray(column, newListboxArray()) return column |
