Alpha4 polish griglie e login
This commit is contained in:
@@ -23,7 +23,8 @@ from gestione_aree import AsyncRunner
|
||||
from gestione_scarico import move_pallet_async
|
||||
from locale_text import load_locale_catalog, text as loc_text
|
||||
from tooltips import WidgetToolTip, load_tooltip_catalog, tooltip_text
|
||||
from ui_theme import theme_color, theme_font, theme_padding, theme_section, theme_value
|
||||
from ui_theme import theme_color, theme_font, theme_section, theme_value
|
||||
from ui_tables import style_treeview, zebra_tag
|
||||
from version_info import module_version, versioned_title
|
||||
from window_placement import place_window_fullsize_below_parent_later
|
||||
|
||||
@@ -301,35 +302,6 @@ class ResetCorsieWindow(ctk.CTkToplevel):
|
||||
def _setup_tree_style(self):
|
||||
"""Apply a denser, spreadsheet-like style to the main result grid."""
|
||||
|
||||
style = ttk.Style(self)
|
||||
style.configure(
|
||||
"ResetCorsie.Treeview.Heading",
|
||||
font=theme_font(self._theme, "tree_heading_font", ("Segoe UI", 10, "bold")),
|
||||
background=theme_value(self._theme, "tree_heading_bg", "#b8c7db"),
|
||||
foreground=theme_value(self._theme, "tree_heading_fg", "#10243e"),
|
||||
relief="flat",
|
||||
padding=theme_padding(self._theme, "tree_heading_padding", (8, 6)),
|
||||
)
|
||||
style.map(
|
||||
"ResetCorsie.Treeview.Heading",
|
||||
background=[("active", theme_value(self._theme, "tree_heading_bg_active", "#aebfd6"))],
|
||||
relief=[("pressed", "groove"), ("!pressed", "flat")],
|
||||
)
|
||||
style.configure(
|
||||
"ResetCorsie.Treeview",
|
||||
font=theme_font(self._theme, "tree_body_font", ("Segoe UI", 10)),
|
||||
rowheight=int(theme_value(self._theme, "tree_row_height", 30)),
|
||||
background=theme_value(self._theme, "tree_body_bg", "#ffffff"),
|
||||
fieldbackground=theme_value(self._theme, "tree_body_bg", "#ffffff"),
|
||||
foreground=theme_value(self._theme, "tree_body_fg", "#1f1f1f"),
|
||||
borderwidth=0,
|
||||
)
|
||||
style.map(
|
||||
"ResetCorsie.Treeview",
|
||||
background=[("selected", theme_value(self._theme, "tree_selected_bg", "#cfe4ff"))],
|
||||
foreground=[("selected", theme_value(self._theme, "tree_selected_fg", "#10243e"))],
|
||||
)
|
||||
|
||||
@_log_call()
|
||||
def _build_ui(self):
|
||||
"""Create selectors, summary widgets and the occupied-cell grid."""
|
||||
@@ -414,8 +386,13 @@ class ResetCorsieWindow(ctk.CTkToplevel):
|
||||
width=int(theme_value(self._theme, "tree_col_num_udc_width", 160)),
|
||||
anchor=str(theme_value(self._theme, "tree_col_num_udc_anchor", "center")),
|
||||
)
|
||||
self.tree.tag_configure("odd", background=theme_value(self._theme, "tree_row_odd_bg", "#ffffff"))
|
||||
self.tree.tag_configure("even", background=theme_value(self._theme, "tree_row_even_bg", "#f3f6fb"))
|
||||
style_treeview(
|
||||
self.tree,
|
||||
style_name="ResetCorsie.Treeview",
|
||||
rowheight=int(theme_value(self._theme, "tree_row_height", 30)),
|
||||
font=theme_font(self._theme, "tree_body_font", ("Segoe UI", 10)),
|
||||
heading_font=theme_font(self._theme, "tree_heading_font", ("Segoe UI", 10, "bold")),
|
||||
)
|
||||
|
||||
sy = ttk.Scrollbar(mid, orient="vertical", command=self.tree.yview)
|
||||
sx = ttk.Scrollbar(mid, orient="horizontal", command=self.tree.xview)
|
||||
@@ -532,7 +509,7 @@ class ResetCorsieWindow(ctk.CTkToplevel):
|
||||
for item in self.tree.get_children():
|
||||
self.tree.delete(item)
|
||||
for idx, (_idc, ubi, n) in enumerate(det_rows):
|
||||
tag = "even" if idx % 2 else "odd"
|
||||
tag = zebra_tag(idx)
|
||||
self.tree.insert("", "end", values=(ubi, n), tags=(tag,))
|
||||
except Exception as ex:
|
||||
_MODULE_LOGGER.exception(f"Errore UI refresh reset corsie corsia={corsia}: {ex}")
|
||||
|
||||
Reference in New Issue
Block a user