Skip to content

Commit bfc7cfb

Browse files
committed
Add scrollbars to settings windows.
Make the settings usable in low resolution screens.
1 parent b2e9bb7 commit bfc7cfb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

prefs.js

+10-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,16 @@ const Settings = new Lang.Class({
9696
this._builder.set_translation_domain(Me.metadata['gettext-domain']);
9797
this._builder.add_from_file(Me.path + '/Settings.ui');
9898

99-
this.widget = this._builder.get_object('settings_notebook');
99+
this.widget = new Gtk.ScrolledWindow({ hscrollbar_policy: Gtk.PolicyType.NEVER });
100+
this._notebook = this._builder.get_object('settings_notebook');
101+
this.widget.add(this._notebook);
102+
103+
// Set a reasonable initial window height
104+
this.widget.connect('realize', Lang.bind(this, function() {
105+
let window = this.widget.get_toplevel();
106+
let [default_width, default_height] = window.get_default_size();
107+
window.resize(default_width, 650);
108+
}));
100109

101110
// Timeout to delay the update of the settings
102111
this._dock_size_timeout = 0;

0 commit comments

Comments
 (0)