config: create a generic button type

This commit is contained in:
alfrix
2024-05-05 18:41:07 -03:00
parent 0287e68afb
commit f704c56ae8
3 changed files with 18 additions and 18 deletions

View File

@@ -257,9 +257,10 @@ class ScreenPanel:
open_menu.set_hexpand(False)
open_menu.set_halign(Gtk.Align.END)
row_box.add(open_menu)
elif option['type'] == "lang":
elif option['type'] == "button":
select = self._gtk.Button("load", style="color3")
select.connect("clicked", self._screen.change_language, option['name'])
if "callback" in option:
select.connect("clicked", option['callback'], option['name'])
select.set_hexpand(False)
select.set_halign(Gtk.Align.END)
row_box.add(select)