st_main_view.py 文件源码

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

项目:Smart-Trader 作者: i-sultan 项目源码 文件源码
def set_app_style():
    style = ttk.Style()
    style.theme_create( "st_app", parent="alt", settings={
        ".":             {"configure": {"background"      : StColors.dark_grey,
                                        "foreground"      : StColors.light_grey,
                                        "relief"          : "flat",
                                        "highlightcolor"  : StColors.bright_green}},

        "TLabel":        {"configure": {"foreground"      : StColors.bright_green,
                                        "padding"         : 10,
                                        "font"            : ("Calibri", 12)}},

        "TNotebook":     {"configure": {"padding"         : 5}},
        "TNotebook.Tab": {"configure": {"padding"         : [25, 5], 
                                        "foreground"      : "white"},
                            "map"      : {"background"      : [("selected", StColors.mid_grey)],
                                        "expand"          : [("selected", [1, 1, 1, 0])]}},

        "TCombobox":     {"configure": {"selectbackground": StColors.dark_grey,
                                        "fieldbackground" : "white",
                                        "background"      : StColors.light_grey,
                                        "foreground"      : "black"}},

        "TButton":       {"configure": {"font"            :("Calibri", 13, 'bold'),
                                        "background"      : "black",
                                        "foreground"      : StColors.bright_green},
                            "map"      : {"background"      : [("active", StColors.bright_green)],
                                        "foreground"      : [("active", 'black')]}},

        "TEntry":        {"configure": {"foreground"      : "black"}},
        "Horizontal.TProgressbar":{"configure": {"background": StColors.mid_grey}}
    })
    style.theme_use("st_app")

#.----------------.
#|    classes     |
#'----------------'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号