From d9c59ef50eea3cc2c6dd5e4c888d33f256d3dc34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Mon, 30 Sep 2019 03:58:12 +0200 Subject: [PATCH] prefs: don't scroll the tabs The default tree view search doesn't work and can pop up outside the scroll so disable it. TODO: add something like `ctrl-f`, `/` to focus the search input --- Settings.ui | 38 +++++++++++++++++++++++++++++++++++--- prefs.js | 8 +++----- 2 files changed, 38 insertions(+), 8 deletions(-) diff --git a/Settings.ui b/Settings.ui index 4df4c48..1acfbdf 100644 --- a/Settings.ui +++ b/Settings.ui @@ -523,10 +523,9 @@ - + True False - 24 vertical @@ -543,7 +542,40 @@ - + + True + True + never + in + + + True + False + + + True + False + True + vertical + + + + + + + + + + + + + + + + False + True + 1 + diff --git a/prefs.js b/prefs.js index 91bad49..914317d 100644 --- a/prefs.js +++ b/prefs.js @@ -63,13 +63,11 @@ class SettingsWidget { constructor(selectedTab=0, selectedWorkspace=0 ) { this._settings = Convenience.getSettings(); - this.builder = new Gtk.Builder(); - this.builder.add_from_file(Extension.path + '/Settings.ui'); + this.builder = Gtk.Builder.new_from_file(Extension.path + '/Settings.ui'); - this.widget = new Gtk.ScrolledWindow({ hscrollbar_policy: Gtk.PolicyType.NEVER }); this._notebook = this.builder.get_object('paperwm_settings'); + this.widget = this._notebook; this._notebook.page = selectedTab; - this.widget.add(this._notebook); // General @@ -380,12 +378,12 @@ function createKeybindingWidget(settings, searchEntry) { ]); let treeView = new Gtk.TreeView(); + treeView.set_enable_search(false); treeView.model = filteredModel; treeView.headers_visible = false; treeView.margin_start = 12; treeView.margin_end = 12; treeView.search_column = COLUMN_DESCRIPTION; - treeView.enable_search = true; treeView.tooltip_column = COLUMN_TOOLTIP; let descriptionRenderer = new Gtk.CellRendererText();