magictk/debug.py

23 lines
997 B
Python
Raw Normal View History

2024-03-24 18:16:29 +08:00
import magictk
if __name__ == "__main__":
win = magictk.Window()
pb = magictk.ProgressBar(win)
pb.pack()
magictk.Button(win, text="Default(+)",
func=lambda s: pb.add_progress(0.1)).pack()
magictk.ButtonFill(win, text="Primary(-)",
func=lambda s: pb.add_progress(-0.1)).pack()
magictk.ButtonFill(win, color_type="success", text="Success(+)",
func=lambda s: pb.add_progress(0.02)).pack()
magictk.ButtonFill(win, color_type="info", text="Info(-)",
func=lambda s: pb.add_progress(-0.02)).pack()
magictk.ButtonFill(win, color_type="warning", text="Warning(+)",
func=lambda s: pb.add_progress(0.3)).pack()
magictk.ButtonFill(win, color_type="danger", text="Danger(-)",
func=lambda s: pb.add_progress(-0.3)).pack()
win.mainloop()
# from magictk import workspace
# print(workspace.get_gtk_workspace_size())