mirror of
https://github.com/aclist/dztui.git
synced 2026-11-03 16:42:13 +01:00
feat: folder icons
This commit is contained in:
1 parent
d4a99f8229
commit
6050a370f8
3 files changed
+16
-8
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user