Fix: Windows-Titelleistensymbol durch AppUserModelID und setWindowIcon korrekt gesetzt (v1.6.1)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+12
@@ -1,6 +1,8 @@
|
||||
import sys
|
||||
import logging
|
||||
from pathlib import Path
|
||||
|
||||
from PySide6.QtGui import QIcon
|
||||
from PySide6.QtWidgets import QApplication
|
||||
|
||||
from ui.MainWindow import MainWindow
|
||||
@@ -80,9 +82,19 @@ def main():
|
||||
# Alte Log-Dateien aufräumen (erst nach Logger-Init)
|
||||
cleanup_old_logs(log_dir, max_age_hours=24)
|
||||
|
||||
# Unter Windows: AppUserModelID setzen, damit die Taskleiste das richtige Symbol zeigt
|
||||
if sys.platform == "win32":
|
||||
import ctypes
|
||||
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID("de.vitaligraf.documentor")
|
||||
|
||||
# QApplication-Instanz erstellen
|
||||
app = QApplication(sys.argv)
|
||||
|
||||
# App-Symbol setzen
|
||||
icon_path = Path(__file__).parent.parent / "resources" / "icon.ico"
|
||||
if icon_path.exists():
|
||||
app.setWindowIcon(QIcon(str(icon_path)))
|
||||
|
||||
# Hauptfenster erstellen
|
||||
window = MainWindow()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user