[gnome-shell] extensionPrefs: Scroll with key focus
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extensionPrefs: Scroll with key focus
- Date: Mon, 3 Feb 2020 18:23:27 +0000 (UTC)
commit db85e7084cd02c8a168158d4d06c246bf6476b9c
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Jan 30 01:28:02 2020 +0100
extensionPrefs: Scroll with key focus
Currently when the extensions list is scrolled, it is possible to
keynav out of view, as the scrolling doesn't follow the key focus.
Hook up the adjustment to fix that.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/1968
js/extensionPrefs/main.js | 4 ++++
js/extensionPrefs/ui/extensions-window.ui | 4 ++--
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/js/extensionPrefs/main.js b/js/extensionPrefs/main.js
index 55172fb54a..74292957e1 100644
--- a/js/extensionPrefs/main.js
+++ b/js/extensionPrefs/main.js
@@ -70,7 +70,9 @@ var ExtensionsWindow = GObject.registerClass({
InternalChildren: [
'extensionsList',
'killSwitch',
+ 'mainBox',
'mainStack',
+ 'scrolledWindow',
],
}, class ExtensionsWindow extends Gtk.ApplicationWindow {
_init(params) {
@@ -80,6 +82,8 @@ var ExtensionsWindow = GObject.registerClass({
this._loaded = false;
this._prefsDialog = null;
+ this._mainBox.set_focus_vadjustment(this._scrolledWindow.vadjustment);
+
this._settings = new Gio.Settings({ schema_id: 'org.gnome.shell' });
this._settings.bind('disable-user-extensions',
this._killSwitch, 'active',
diff --git a/js/extensionPrefs/ui/extensions-window.ui b/js/extensionPrefs/ui/extensions-window.ui
index 8c235f4a03..7305a03ee4 100644
--- a/js/extensionPrefs/ui/extensions-window.ui
+++ b/js/extensionPrefs/ui/extensions-window.ui
@@ -25,14 +25,14 @@
<property name="visible">True</property>
<property name="transition_type">crossfade</property>
<child>
- <object class="GtkScrolledWindow">
+ <object class="GtkScrolledWindow" id="scrolledWindow">
<property name="visible">True</property>
<property name="hscrollbar_policy">never</property>
<child>
<object class="GtkViewport">
<property name="visible">True</property>
<child>
- <object class="GtkBox">
+ <object class="GtkBox" id="mainBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="halign">center</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]