fix
This commit is contained in:
parent
a1111d1e2f
commit
3b2edf9af2
1 changed files with 15 additions and 3 deletions
|
|
@ -26,14 +26,20 @@ class PlayerctlApp(Gtk.Application):
|
|||
window.set_border_width(12)
|
||||
window.set_default_size(320, 120)
|
||||
|
||||
controls = Gtk.Box(spacing=6)
|
||||
controls.set_orientation(Gtk.Orientation.HORIZONTAL)
|
||||
controls = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=6)
|
||||
controls.set_homogeneous(True)
|
||||
controls.set_hexpand(True)
|
||||
controls.set_vexpand(True)
|
||||
controls.set_valign(Gtk.Align.FILL)
|
||||
|
||||
prev_button = Gtk.Button.new_from_icon_name(
|
||||
"media-skip-backward",
|
||||
Gtk.IconSize.LARGE_TOOLBAR,
|
||||
)
|
||||
prev_button.connect("clicked", self._on_prev_clicked)
|
||||
prev_button.set_hexpand(True)
|
||||
prev_button.set_vexpand(True)
|
||||
prev_button.set_valign(Gtk.Align.FILL)
|
||||
controls.pack_start(prev_button, True, True, 0)
|
||||
|
||||
toggle_button = Gtk.Button.new_from_icon_name(
|
||||
|
|
@ -41,6 +47,9 @@ class PlayerctlApp(Gtk.Application):
|
|||
Gtk.IconSize.LARGE_TOOLBAR,
|
||||
)
|
||||
toggle_button.connect("clicked", self._on_toggle_clicked)
|
||||
toggle_button.set_hexpand(True)
|
||||
toggle_button.set_vexpand(True)
|
||||
toggle_button.set_valign(Gtk.Align.FILL)
|
||||
controls.pack_start(toggle_button, True, True, 0)
|
||||
|
||||
next_button = Gtk.Button.new_from_icon_name(
|
||||
|
|
@ -48,10 +57,13 @@ class PlayerctlApp(Gtk.Application):
|
|||
Gtk.IconSize.LARGE_TOOLBAR,
|
||||
)
|
||||
next_button.connect("clicked", self._on_next_clicked)
|
||||
next_button.set_hexpand(True)
|
||||
next_button.set_vexpand(True)
|
||||
next_button.set_valign(Gtk.Align.FILL)
|
||||
controls.pack_start(next_button, True, True, 0)
|
||||
|
||||
layout = Gtk.Box(orientation=Gtk.Orientation.VERTICAL, spacing=12)
|
||||
layout.pack_start(controls, False, False, 0)
|
||||
layout.pack_start(controls, True, True, 0)
|
||||
|
||||
window.add(layout)
|
||||
window.show_all()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue