v1.9.37: align tab buttons with header controls on same Y-level

Removed separate header_bar, overlay header controls (language, update,
about) directly on tabview's tab row using place(). Tabs and controls
now sit in the same horizontal line — no vertical gap.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
chrome-storm-c442
2026-03-06 09:01:16 -05:00
parent f5c91adac8
commit a7b4850c47
3 changed files with 19 additions and 16 deletions

View File

@@ -169,15 +169,13 @@ class App(ctk.CTk):
self._main_frame = ctk.CTkFrame(self._paned, fg_color="transparent")
self._paned.add(self._main_frame, minsize=500)
# Header bar (language + about)
header_bar = ctk.CTkFrame(self._main_frame, fg_color="transparent", height=40)
header_bar.pack(fill="x", padx=10, pady=(8, 0))
header_bar.pack_propagate(False)
# Header controls — overlay frame placed on top of tabview's tab row
self._header_controls = ctk.CTkFrame(self._main_frame, fg_color="transparent", height=30)
# Language selector
_lang_img = ctk_icon("globe", 18)
self._lang_icon = ctk.CTkLabel(
header_bar, text="" if _lang_img else "\U0001f310",
self._header_controls, text="" if _lang_img else "\U0001f310",
image=_lang_img, font=ctk.CTkFont(size=14), width=20,
)
self._lang_icon.pack(side="right", padx=(5, 0))
@@ -185,17 +183,17 @@ class App(ctk.CTk):
current_display = LANGUAGES.get(i18n.get_language(), "English")
self._lang_var = ctk.StringVar(value=current_display)
self.lang_menu = ctk.CTkOptionMenu(
header_bar, values=lang_values, variable=self._lang_var,
width=110, height=30, command=self._change_language
self._header_controls, values=lang_values, variable=self._lang_var,
width=110, height=26, command=self._change_language
)
self.lang_menu.pack(side="right", padx=(5, 0))
# Check Updates button
_sync_img = ctk_icon("refresh", 18)
self._update_check_btn = ctk.CTkButton(
header_bar, text="" if _sync_img else "\u21bb",
image=_sync_img, width=30, height=30,
corner_radius=15, fg_color="#6b7280", hover_color="#4b5563",
self._header_controls, text="" if _sync_img else "\u21bb",
image=_sync_img, width=26, height=26,
corner_radius=13, fg_color="#6b7280", hover_color="#4b5563",
command=self._check_updates_manual,
)
self._update_check_btn.pack(side="right", padx=(5, 0))
@@ -203,12 +201,12 @@ class App(ctk.CTk):
# About button
_info_img = ctk_icon("info", 18)
self.about_btn = ctk.CTkButton(
header_bar, text="" if _info_img else "",
image=_info_img, width=30, height=30,
corner_radius=15, fg_color="#6b7280", hover_color="#4b5563",
self._header_controls, text="" if _info_img else "",
image=_info_img, width=26, height=26,
corner_radius=13, fg_color="#6b7280", hover_color="#4b5563",
command=self._show_about
)
self.about_btn.pack(side="right", padx=(5, 5))
self.about_btn.pack(side="right", padx=(5, 0))
# Update banner (hidden by default)
self._update_banner = None
@@ -251,8 +249,13 @@ class App(ctk.CTk):
# Create new tabview
self.tabview = ctk.CTkTabview(self._main_frame, command=self._on_tab_changed)
self.tabview._outer_spacing = 0
self.tabview._outer_button_overhang = 0
self.tabview._configure_grid()
self.tabview.pack(fill="both", expand=True, padx=10, pady=(0, 10))
self.tabview.pack(fill="both", expand=True, padx=10, pady=(4, 10))
# Overlay header controls on top-right of tabview (same row as tab buttons)
self._header_controls.lift()
self._header_controls.place(in_=self.tabview, relx=1.0, y=0, anchor="ne", relwidth=0.4)
for key in self._tab_keys:
self.tabview.add(_tab_label(key))

View File

@@ -1,6 +1,6 @@
"""Version info for ServerManager."""
__version__ = "1.9.36"
__version__ = "1.9.37"
__app_name__ = "ServerManager"
__author__ = "aibot777"
__description__ = "Desktop GUI for managing remote servers"