def tableView_cellForRowAtIndexPath_(sel,cmd,tableView,indexPath):
ip = ObjCInstance(indexPath)
ds = ObjCInstance(sel)
data = ds.data[ip.row()]
tv = ObjCInstance(sel)
cell = ui.TableViewCell('subtitle')
cell.text_label.text = data['name']
cell.detail_text_label.text = data['docsetname']
cell.image_view.image = data['icon']
cell.border_color = Theme_manager.currentTheme.borderColour
cell.background_color = Theme_manager.currentTheme.backgroundColour
cell.bg_color = Theme_manager.currentTheme.backgroundColour
cell.tint_color = Theme_manager.currentTheme.tintColour
cell.text_label.text_color = Theme_manager.currentTheme.textColour
cell.detail_text_label.text_color = Theme_manager.currentTheme.subTextColour
selectedBackgroundView = ui.View()
selectedBackgroundView.background_color = Theme_manager.currentTheme.cellSelectionColour
if not Theme_manager.currentTheme.showCellSelection:
selectedBackgroundView.alpha = 0
cell.selected_background_view = selectedBackgroundView
iv = ui.ImageView()
cell.content_view.add_subview(iv)
iv.image = data['type'].icon
iv.width = 15
iv.height = 15
iv.x = cell.content_view.width - (iv.width * 2)
iv.y = (cell.content_view.height) / 2 - (iv.height)
iv.flex = 'L'
return ObjCInstance(cell).ptr
评论列表
文章目录