Introdotto versioning visibile ver 1.0

This commit is contained in:
2026-06-05 11:33:47 +02:00
parent 742f6a9fe9
commit 8f9957a2db
29 changed files with 225 additions and 18 deletions

View File

@@ -19,6 +19,9 @@ from barcode_repository import BarcodeRepository
from barcode_service import BarcodeActionResult, BarcodeService, BarcodeViewState
from db_config import build_dsn_from_config, ensure_db_config
from login_window import prompt_login_compact
from version_info import module_version, versioned_title
__version__ = module_version(__name__)
class BarcodeClientApp:
@@ -59,9 +62,11 @@ class BarcodeClientApp:
self._apply_state(self.service.state)
self._bind_keys()
self.root.protocol("WM_DELETE_WINDOW", self._shutdown)
self.root.after(80, self._finalize_window_placement)
self.root.after(250, self._finalize_window_placement)
def _build_ui(self) -> None:
self.root.title("WMS")
self.root.title(versioned_title("WMS", __name__))
self.root.configure(bg="#f1f1f1")
self._apply_responsive_geometry()
@@ -254,6 +259,18 @@ class BarcodeClientApp:
self.root.geometry(f"{width}x{height}+{x}+{y}")
def _finalize_window_placement(self) -> None:
"""Let Windows finish frame sizing, then snap the barcode window in place."""
try:
if self._is_barcode_desktop:
self.root.state("zoomed")
else:
self.root.geometry("+0+0")
self.root.update_idletasks()
except Exception:
pass
def _bind_keys(self) -> None:
self.root.bind("<F1>", lambda _e: self._start_queue(1))
self.root.bind("<F2>", lambda _e: self._start_queue(0))