board_list.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:boartty 作者: openstack 项目源码 文件源码
def __init__(self, app, board, topic, callback=None):
        super(BoardRow, self).__init__('', on_press=callback,
                                         user_data=(board.key, board.title))
        self.app = app
        self.mark = False
        self._style = None
        self.board_key = board.key
        if topic:
            self.topic_key = topic.key
            self.indent = '  '
        else:
            self.topic_key = None
            self.indent = ''
        self.board_title = board.title
        self.title = mywid.SearchableText('')
        self._setTitle(board.title, self.indent)
        self.title.set_wrap_mode('clip')
        self.active_stories = urwid.Text(u'', align=urwid.RIGHT)
        col = urwid.Columns([
                self.title,
                ('fixed', ACTIVE_COL_WIDTH, self.active_stories),
                ])
        self.row_style = urwid.AttrMap(col, '')
        self._w = urwid.AttrMap(self.row_style, None, focus_map=self.board_focus_map)
        self.update(board)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号