def __init__(self, app, cell, category_name, tool_name, tool_url):
self.app, self.cell = app, cell
self.category_name, self.tool_name, self.tool_url = category_name, tool_name, tool_url
self.btn = ui.Button()
self.cell.content_view.add_subview(self.btn)
self.btn.font = ('Helvetica', 12)
self.btn.background_color = 'white'
self.btn.border_width = 1
self.btn.corner_radius = 5
self.btn.size_to_fit()
self.btn.width = 58
self.btn.x = self.app.nav_view.width - self.btn.width - 8
self.btn.y = (self.cell.height - self.btn.height) / 2
if self.app.is_tool_installed(self.category_name, tool_name):
self.set_state_uninstall()
else:
self.set_state_install()
评论列表
文章目录