Implement native borderless window integration

This commit is contained in:
lm
2025-10-19 18:26:36 +02:00
parent f2db62036b
commit 01a9b2707c
2 changed files with 54 additions and 17 deletions
+12
View File
@@ -446,6 +446,11 @@ class UIBuilderMixin:
max_btn.bind("<Leave>", lambda _e: max_btn.configure(bg=bar_bg))
self._max_button = max_btn
min_btn = tk.Button(title_bar, text="—", command=self._minimize_window, **btn_kwargs)
min_btn.pack(side=tk.RIGHT, padx=0, pady=4)
min_btn.bind("<Enter>", lambda _e: min_btn.configure(bg="#2c2c32"))
min_btn.bind("<Leave>", lambda _e: min_btn.configure(bg=bar_bg))
for widget in (title_bar, title_label):
widget.bind("<ButtonPress-1>", self._start_window_drag)
widget.bind("<B1-Motion>", self._perform_window_drag)
@@ -558,6 +563,13 @@ class UIBuilderMixin:
else:
self._restore_window()
def _minimize_window(self) -> None:
try:
self._remember_window_geometry()
self.root.iconify()
except Exception:
pass
def _update_maximize_button(self) -> None:
button = getattr(self, "_max_button", None)
if button is None: