refactor: Centralize resource path management

Create a new `settings.py` file to define and manage global application paths.

Modify UI components (`split_view_widget.py`, `view_settings_dialog.py`) to use the centralized `ICONS_DIR` path constant instead of hardcoded relative paths for icons. This improves maintainability and makes the application independent of the working directory.
This commit is contained in:
2025-10-14 08:33:08 +02:00
parent bbdb7d3459
commit d62b367b47
3 changed files with 44 additions and 31 deletions

13
settings.py Normal file
View File

@@ -0,0 +1,13 @@
from pathlib import Path
# Absolutna ścieżka do głównego katalogu projektu
ROOT_DIR = Path(__file__).parent.resolve()
# Ścieżka do katalogu UI
UI_DIR = ROOT_DIR / "ui"
# Ścieżka do katalogu z ikonami
ICONS_DIR = UI_DIR / "icons"
# Ścieżka do katalogu z mediami
MEDIA_DIR = ROOT_DIR / "media"