feat: folder icons

This commit is contained in:
aclist committed 2026-06-10 06:21:12 +09:00
1 parent d4a99f8229
commit 6050a370f8
3 files changed
+16 -8

No files matched your search

+9 -4
View File
@@ -48,8 +48,10 @@ class LargeIcon(Gtk.Image):
class IconButton(Gtk.Button):
def __init__(self, icon: str, margin: int = 0) -> None:
super().__init__()
def __init__(
self, icon: str, margin: int = 0, halign: Gtk.Align = Gtk.Align.START
) -> None:
super().__init__(halign=halign)
self.icon = Icon(icon, l_margin=margin)
self.set_image(self.icon)
self.set_image_position(Gtk.PositionType.RIGHT)
@@ -57,8 +59,11 @@ class IconButton(Gtk.Button):
class IconTextButton(IconButton):
def __init__(self, icon: str, label: str) -> None:
super().__init__(icon, margin=5)
def __init__(
self, icon: str, label: str, halign: Gtk.Align = Gtk.Align.START
) -> None:
super().__init__(icon, margin=5, halign=halign)
print(icon)
self.set_label(label)