diff --git a/prefs.js b/prefs.js index 326433154..d3a252b75 100644 --- a/prefs.js +++ b/prefs.js @@ -354,8 +354,10 @@ const WorkspaceSettingsWidget = new GObject.Class({ this.settings.set_boolean('scroll-switch-workspace-one-at-a-time', check.get_active()); })); - let dockSettingsGrid3= new Gtk.Grid({row_homogeneous:true,column_homogeneous:false}); - let deadTimeLabel = new Gtk.Label({label: _("Dead time to wait between each workspace switching [ms]"), use_markup: true, xalign: 0,hexpand:true}); + let deadTimeSettings= new Gtk.Box({spacing:30, orientation:Gtk.Orientation.HORIZONTAL, homogeneous:false, + margin_bottom:5}); + indentWidget(deadTimeSettings); + let deadTimeLabel = new Gtk.Label({label: _("Deadtime between each workspace switching [ms]"), use_markup: true, xalign: 0,hexpand:true}); let deadTime = new Gtk.SpinButton({halign:Gtk.Align.END}); deadTime.set_sensitive(true); deadTime.set_range(0, 1000); @@ -365,8 +367,6 @@ const WorkspaceSettingsWidget = new GObject.Class({ let s = button.get_value_as_int(); this.settings.set_int('scroll-switch-workspace-dead-time', s); })); - dockSettingsGrid3.attach(deadTimeLabel, 0,0,1,1); - dockSettingsGrid3.attach(deadTime, 1,0,1,1); let only1px = new Gtk.RadioButton({label: _("Only a 1px wide area close to the screen edge is active")}); @@ -380,10 +380,16 @@ const WorkspaceSettingsWidget = new GObject.Class({ if(check.get_active()) this.settings.set_boolean('scroll-switch-workspace-whole', true); })); + this.settings.bind('scroll-switch-workspace-one-at-a-time', deadTimeSettings, 'sensitive', Gio.SettingsBindFlags.DEFAULT); + + this.settings.bind('scroll-switch-workspace', switchWorkspaceMain, 'sensitive', Gio.SettingsBindFlags.DEFAULT); + deadTimeSettings.add(deadTimeLabel); + deadTimeSettings.add(deadTime); + switchWorkspaceMain.add(oneAtATime); - switchWorkspaceMain.add(dockSettingsGrid3); + switchWorkspaceMain.add(deadTimeSettings); switchWorkspaceMain.add(only1px); switchWorkspaceMain.add(wholeArea);