changed to icons
This commit is contained in:
parent
92b608048d
commit
a1111d1e2f
1 changed files with 12 additions and 9 deletions
|
|
@ -26,28 +26,31 @@ class PlayerctlApp(Gtk.Application):
|
|||
window.set_border_width(12)
|
||||
window.set_default_size(320, 120)
|
||||
|
||||
self._label = Gtk.Label(label="Connecting to player…")
|
||||
self._label.set_hexpand(True)
|
||||
self._label.set_line_wrap(True)
|
||||
self._label.set_justify(Gtk.Justification.CENTER)
|
||||
|
||||
controls = Gtk.Box(spacing=6)
|
||||
controls.set_orientation(Gtk.Orientation.HORIZONTAL)
|
||||
|
||||
prev_button = Gtk.Button.new_with_label("Prev")
|
||||
prev_button = Gtk.Button.new_from_icon_name(
|
||||
"media-skip-backward",
|
||||
Gtk.IconSize.LARGE_TOOLBAR,
|
||||
)
|
||||
prev_button.connect("clicked", self._on_prev_clicked)
|
||||
controls.pack_start(prev_button, True, True, 0)
|
||||
|
||||
toggle_button = Gtk.Button.new_with_label("Play/Pause")
|
||||
toggle_button = Gtk.Button.new_from_icon_name(
|
||||
"media-playback-start",
|
||||
Gtk.IconSize.LARGE_TOOLBAR,
|
||||
)
|
||||
toggle_button.connect("clicked", self._on_toggle_clicked)
|
||||
controls.pack_start(toggle_button, True, True, 0)
|
||||
|
||||
next_button = Gtk.Button.new_with_label("Next")
|
||||
next_button = Gtk.Button.new_from_icon_name(
|
||||
"media-skip-forward",
|
||||
Gtk.IconSize.LARGE_TOOLBAR,
|
||||
)
|
||||
next_button.connect("clicked", self._on_next_clicked)
|
||||
controls.pack_start(next_button, True, True, 0)
|
||||
|
||||
layout = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
|
||||
layout.pack_start(self._label, True, True, 0)
|
||||
layout.pack_start(controls, False, False, 0)
|
||||
|
||||
window.add(layout)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue