Skip to content

Commit

Permalink
Make the spin row a bit nicer to use with hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
rdbende committed Dec 4, 2024
1 parent 173cbf8 commit 025e829
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cozy/ui/widgets/sleep_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ def _create_spin_timer_row(self, group: Adw.ActionRow) -> Adw.SpinRow:
spin_row.add_css_class("sleep-timer")
self._add_radio_button_to_timer_row(spin_row, -1, group.radio)

spin_button = spin_row.get_first_child().get_last_child().get_last_child()
spin_button.set_halign(Gtk.Align.END)

spin_row.connect("input", lambda x, y: spin_row.activate() or 0)

return spin_row

def _update_custom_interval_text(self, *_) -> None:
Expand Down

0 comments on commit 025e829

Please sign in to comment.