change tk

This commit is contained in:
zj
2026-02-09 03:14:35 +08:00
parent 8c53b9c0a0
commit 1a3a4746a3
13 changed files with 3595 additions and 221 deletions

43
main_tkinter.py Normal file
View File

@@ -0,0 +1,43 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Linux 存储管理工具 - Tkinter 版本
适配低版本系统(如 CentOS 8
"""
import tkinter as tk
from tkinter import ttk
import sys
import os
# 将当前目录添加到路径
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from mainwindow_tkinter import MainWindow
def main():
"""主程序入口"""
root = tk.Tk()
root.title("Linux 存储管理工具")
root.geometry("1200x800")
# 设置最小窗口大小
root.minsize(800, 600)
# 尝试设置 DPI 感知(仅在 Windows 上有效)
try:
from ctypes import windll
windll.shcore.SetProcessDpiAwareness(1)
except Exception:
pass
# 创建应用
app = MainWindow(root)
# 运行主循环
root.mainloop()
if __name__ == "__main__":
main()