sublime_music.ui.common.icon_button module

class sublime_music.ui.common.icon_button.IconButton(icon_name, tooltip_text='', relief=False, icon_size=<enum GTK_ICON_SIZE_BUTTON of type Gtk.IconSize>, label=None, **kwargs)[source]

Bases: gi.overrides.Gtk.Button

Parameters
  • icon_name (Optional[str]) –

  • tooltip_text (str) –

  • relief (bool) –

  • icon_size (gi.repository.Gtk.IconSize) –

  • label (str | None) –

__init__(icon_name, tooltip_text='', relief=False, icon_size=<enum GTK_ICON_SIZE_BUTTON of type Gtk.IconSize>, label=None, **kwargs)[source]
Parameters
set_icon(icon_name)[source]
Parameters

icon_name (Optional[str]) –

class sublime_music.ui.common.icon_button.IconMenuButton(icon_name=None, tooltip_text='', relief=True, icon_size=<enum GTK_ICON_SIZE_BUTTON of type Gtk.IconSize>, label=None, popover=None, **kwargs)[source]

Bases: gi.repository.Gtk.MenuButton

Parameters
  • icon_name (Optional[str]) –

  • tooltip_text (str) –

  • relief (bool) –

  • icon_size (gi.repository.Gtk.IconSize) –

  • label (str | None) –

  • popover (Any) –

__init__(icon_name=None, tooltip_text='', relief=True, icon_size=<enum GTK_ICON_SIZE_BUTTON of type Gtk.IconSize>, label=None, popover=None, **kwargs)[source]
Parameters
set_from_file(icon_file)[source]
Parameters

icon_file (Optional[str]) –

set_icon(icon_name)[source]
Parameters

icon_name (Optional[str]) –

class sublime_music.ui.common.icon_button.IconToggleButton(icon_name, tooltip_text='', relief=False, icon_size=<enum GTK_ICON_SIZE_BUTTON of type Gtk.IconSize>, label=None, **kwargs)[source]

Bases: gi.repository.Gtk.ToggleButton

Parameters
  • icon_name (Optional[str]) –

  • tooltip_text (str) –

  • relief (bool) –

  • icon_size (gi.repository.Gtk.IconSize) –

  • label (str | None) –

__init__(icon_name, tooltip_text='', relief=False, icon_size=<enum GTK_ICON_SIZE_BUTTON of type Gtk.IconSize>, label=None, **kwargs)[source]
Parameters
get_active(self) bool[source]
Return type

bool

set_active(self, is_active: bool)[source]
Parameters

active (bool) –

set_icon(icon_name)[source]
Parameters

icon_name (Optional[str]) –