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