window.py 文件源码

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

项目:nvim-pygtk3 作者: rliang 项目源码 文件源码
def update_color(self, bg_color: str, is_dark: bool):
        """Updates the widget's background color and theme.

        :bg_color: string representing the color, or 'None'.
        :is_dark: whether the background is dark, see `:h background`.

        """
        self.get_settings().props.gtk_application_prefer_dark_theme = is_dark
        if bg_color != 'None':
            rgba = Gdk.RGBA()
            rgba.parse(bg_color)
            self.set_color_background(rgba)
        else:
            GLib.idle_add(self.reset_color)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号