Trim toolbar button footprint

This commit is contained in:
lm 2025-10-17 13:08:42 +02:00
parent 923b773ee4
commit 7156bbb6c4
1 changed files with 5 additions and 5 deletions

View File

@ -192,11 +192,11 @@ class UIBuilderMixin:
swatch.bind("<Leave>", lambda _e: swatch.configure(highlightbackground="#b1b1b6"))
def _add_toolbar_button(self, parent, text: str, command) -> None:
font = tkfont.Font(root=self.root, family="Segoe UI", size=10, weight="bold")
padding_x = 18
font = tkfont.Font(root=self.root, family="Segoe UI", size=9)
padding_x = 12
width = font.measure(text) + padding_x * 2
height = 32
radius = 12
height = 28
radius = 9
bg = self.root.cget("bg") if hasattr(self.root, "cget") else "#f2f2f7"
canvas = tk.Canvas(
parent,
@ -209,7 +209,7 @@ class UIBuilderMixin:
cursor="hand2",
takefocus=1,
)
canvas.pack(side=tk.LEFT, padx=6)
canvas.pack(side=tk.LEFT, padx=4, pady=1)
palette = self._toolbar_palette()
rect_id = self._create_round_rect(