widget.py 文件源码

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

项目:grbl-stream 作者: fragmuffin 项目源码 文件源码
def render(self, strong=False):
        (y, x) = self.window.getmaxyx()
        label_str = " {} ".format(self._label)
        addstr_params = [
            self.row, self.label_col, " {} ".format(self._label),
            curses.color_pair(self.color_index) if curses.has_colors() else 0
        ]

        # heading attributes
        attrs = curses.color_pair(self.color_index) if curses.has_colors() else 0
        if strong:
            attrs |= curses.A_BOLD

        self.window.hline(0, 0, curses.ACS_HLINE, x)
        self.window.addstr(self.row, self.label_col, " {} ".format(self._label), attrs)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号