加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
manager.py 1.54 KB
一键复制 编辑 原始数据 按行查看 历史
max 提交于 2020-03-11 13:13 . Now it remembers names
from tkinter import Toplevel
from selector import Selector
from settings import Settings, Settings_for_frame, Settings_for_root
# Toplevel, Frame, Setting, Selector
class Manager(Toplevel):
def __init__(self, master, writer, root, **kwargs):
super().__init__(master, **kwargs)
self.title("Settings")
self.master = master
self.writer = writer
self.root = root
self.record_of_names = {}
self.record_of_ids = {}
self.selector = Selector(self, bg=self["bg"])
self.fake_frame_background = "white"
self.fake_frame_place_info = {}
self.selector.place(relx=0, rely=0, relwidth=1, relheight=1)
def switch(self, widget, items, modifying=False):
settings = Settings(self, widget, items, modifying)
settings.place(relx=0, rely=0, relwidth=1, relheight=1)
self.wait_window(settings)
def switch_for_frame(self, board, tag, board_dims):
settings = Settings_for_frame(self, board, tag, board_dims)
settings.place(relx=0, rely=0, relwidth=1, relheight=1)
self.wait_window(settings)
def set_root(self, board):
str_dimensions = self.writer.app_geometry.replace("+", " ").replace("x", " ").split()
dimensions = [int(dim) for dim in str_dimensions]
settings = Settings_for_root(self, board, self.writer, self.writer.app_background,
dimensions, self.writer.app_transparency)
settings.place(relx=0, rely=0, relwidth=1, relheight=1)
self.wait_window(settings)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化