Browse Source

feat: 扩大program显示范围

SongZihuan 3 years ago
parent
commit
da00337a42
3 changed files with 9 additions and 2 deletions
  1. 2 1
      tk_ui/admin.py
  2. 1 1
      tk_ui/admin_menu.py
  3. 6 0
      tk_ui/admin_program.py

+ 2 - 1
tk_ui/admin.py

@@ -439,6 +439,7 @@ class AdminStation(AdminStationBase):
             self.show_msg("程序错误", f"系统无法找到程序:\n  {name}")
             return
 
+        program.to_program()
         name, frame = program.get_program_frame()
 
         self.__show_program()
@@ -446,7 +447,7 @@ class AdminStation(AdminStationBase):
         self._program_title[1].set(f' {name}')
         self._program_title[0].place(relx=0.00, rely=0.00, relwidth=1, relheight=0.05)
 
-        frame.place(relx=0.02, rely=0.12, relwidth=0.96, relheight=0.86)
+        frame.place(relx=0.02, rely=0.06, relwidth=0.96, relheight=0.92)
 
         self._program_now = name, frame, program
 

+ 1 - 1
tk_ui/admin_menu.py

@@ -208,7 +208,7 @@ class StatisticsMenu(AdminMenu):
     def __init__(self, station, win, color):
         super().__init__(station, win, color, "数据分析")
         self.btn: List[tk.Button] = [tk.Button(self.frame) for _ in range(6)]
-        self.btn_name = ["时段分析", "时间分析", "积分分析", "信用分析", "失信用户", "通过率"]
+        self.btn_name = ["时段分析", "时间分析", "积分信用分析", "失信用户", "通过率"]
 
     def conf_gui(self, color: str, n: int = 1):
         super().conf_gui(color, n)

+ 6 - 0
tk_ui/admin_program.py

@@ -43,6 +43,9 @@ class AdminProgram(metaclass=abc.ABCMeta):
     def conf_gui(self, n: int = 1):
         ...
 
+    def to_program(self):
+        pass
+
     def get_program_frame(self) -> Tuple[str, tk.Frame]:
         return self.program_title, self.frame
 
@@ -1774,6 +1777,9 @@ class StatisticsBaseProgram(AdminProgram):
     def __conf_font(self, n: int = 1):
         self.btn_font_size = int(14 * n)
 
+    def to_program(self):
+        self.refresh()
+
     def show_color(self):
         self.color_list.delete(0, tk.END)  # 清空列表
         for i in self.color_dict: