rofi.py 文件源码

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

项目:gnome-hud 作者: hardpixel 项目源码 文件源码
def gtk_theme_colors(self):
        window = Gtk.Window()
        style_context = window.get_style_context()
        gtk_theme_colors = {
            'bg': style_context.lookup_color('theme_bg_color')[1],
            'fg': style_context.lookup_color('theme_fg_color')[1],
            'selected_bg': style_context.lookup_color('theme_selected_bg_color')[1],
            'selected_fg': style_context.lookup_color('theme_selected_fg_color')[1],
            'error_bg': style_context.lookup_color('error_bg_color')[1],
            'error_fg': style_context.lookup_color('error_fg_color')[1],
            'info_bg': style_context.lookup_color('info_bg_color')[1],
            'unfocused_fg': style_context.lookup_color('theme_unfocused_fg_color')[1],
            'unfocused_bg': style_context.lookup_color('theme_unfocused_bg_color')[1]
        }

        for name, color in gtk_theme_colors.items():
            gtk_theme_colors[name] = self.rgba_to_hex(color)

        return gtk_theme_colors
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号