mirror of
https://github.com/aclist/dztui.git
synced 2026-10-27 05:02:42 +01:00
15 lines
402 B
Python
15 lines
402 B
Python
import gi
|
|
|
|
gi.require_version("Gtk", "3.0")
|
|
from gi.repository import Gtk # noqa E402
|
|
|
|
|
|
class Icon(Gtk.Image):
|
|
def __init__(self, name: str, l_margin: int = 0) -> None:
|
|
super().__init__(
|
|
icon_name=name, icon_size=Gtk.IconSize.BUTTON, margin_start=l_margin
|
|
)
|
|
|
|
def set_icon_name(self, name: str) -> None:
|
|
super().set_from_icon_name(name, Gtk.IconSize.BUTTON)
|