Made the UI better for describing what's happening in settings

This commit is contained in:
Sumner Evans
2020-02-11 20:22:23 -07:00
parent be8fecbd9b
commit d430f52a49
2 changed files with 16 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
from typing import List, Tuple
from typing import List, Tuple, Optional
import gi
gi.require_version('Gtk', '3.0')
@@ -14,6 +14,7 @@ class EditFormDialog(Gtk.Dialog):
text_fields: List[Tuple[str, str, bool]] = []
boolean_fields: List[Tuple[str, str]] = []
numeric_fields: List[NumericFieldDescription] = []
extra_label: Optional[str] = None
extra_buttons: List[Gtk.Button] = []
def get_object_name(self, obj):
@@ -104,6 +105,12 @@ class EditFormDialog(Gtk.Dialog):
content_grid.attach(spin_button, 1, i, 1, 1)
i += 1
if self.extra_label:
label_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
label_box.add(self.extra_label)
content_grid.attach(label_box, 0, i, 2, 1)
i += 1
button_box = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL)
for button, response_id in self.extra_buttons:
if response_id is None: