entry: Use a scrolled window

This ensures all entries are reachable even with the OSK unfolded
This commit is contained in:
Guido Günther
2021-12-01 13:00:13 +01:00
parent 9fbb974ce4
commit 894191d3a0

View File

@ -46,6 +46,7 @@ class App(Gtk.Application):
def do_activate(self):
w = Gtk.ApplicationWindow(application=self)
w.set_default_size (300, 500)
notebook = Gtk.Notebook()
def add_purpose(entry, purpose):
entry.set_input_purpose(purpose)
@ -54,7 +55,10 @@ class App(Gtk.Application):
purpose_grid = new_grid(self.purposes, add_purpose)
hint_grid = new_grid(self.hints, add_hint)
notebook.append_page(purpose_grid, Gtk.Label(label="Purposes"))
purpose_scroll = Gtk.ScrolledWindow()
purpose_scroll.set_policy(Gtk.PolicyType.NEVER, Gtk.PolicyType.AUTOMATIC)
purpose_scroll.add(purpose_grid)
notebook.append_page(purpose_scroll, Gtk.Label(label="Purposes"))
notebook.append_page(hint_grid, Gtk.Label(label="Hints"))
w.add(notebook)
w.show_all()