From da68adf420b2360c71a12fcb50d842e3a23ee467 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Sat, 5 Apr 2014 15:10:02 -0400 Subject: Gave controls their proper fonts on Mac OS X. --- listbox_darwin.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'listbox_darwin.go') 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 -- cgit v1.2.3