mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Add setting to immediately hide previews on appicon click
This commit is contained in:
97
Settings.ui
97
Settings.ui
@@ -2264,35 +2264,6 @@
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="leave_timeout_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">Time (ms) before hiding (100 is default)</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="leave_timeout_spinbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="width_chars">4</property>
|
||||
<property name="text">25</property>
|
||||
<property name="adjustment">leave_timeout_adjustment</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="value">25</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="animation_time_label">
|
||||
<property name="visible">True</property>
|
||||
@@ -2321,6 +2292,74 @@
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="preview_hide_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="leave_timeout_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">Time (ms) before hiding (100 is default)</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="preview_immediate_click_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="margin_left">12</property>
|
||||
<property name="margin_top">4</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="preview_immediate_click_label">
|
||||
<property name="name">4</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">4</property>
|
||||
<property name="label" translatable="yes">Immediate on application icon click</property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="leave_timeout_spinbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="width_chars">4</property>
|
||||
<property name="text">25</property>
|
||||
<property name="adjustment">leave_timeout_adjustment</property>
|
||||
<property name="numeric">True</property>
|
||||
<property name="value">25</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
@@ -748,7 +748,7 @@ var taskbarAppIcon = Utils.defineClass({
|
||||
|
||||
let appCount = this.getAppIconInterestingWindows().length;
|
||||
let previewedAppIcon = this._previewMenu.getCurrentAppIcon();
|
||||
this._previewMenu.close();
|
||||
this._previewMenu.close(this._dtpSettings.get_boolean('window-preview-hide-immediate-click'));
|
||||
|
||||
// We check if the app is running, and that the # of windows is > 0 in
|
||||
// case we use workspace isolation,
|
||||
|
||||
7
prefs.js
7
prefs.js
@@ -1102,6 +1102,11 @@ const Settings = new Lang.Class({
|
||||
this._settings.set_int('leave-timeout', widget.get_value());
|
||||
}));
|
||||
|
||||
this._settings.bind('window-preview-hide-immediate-click',
|
||||
this._builder.get_object('preview_immediate_click_button'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
this._builder.get_object('animation_time_spinbutton').set_value(this._settings.get_int('window-preview-animation-time'));
|
||||
this._builder.get_object('animation_time_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
||||
this._settings.set_int('window-preview-animation-time', widget.get_value());
|
||||
@@ -1157,6 +1162,8 @@ const Settings = new Lang.Class({
|
||||
this._settings.set_value('leave-timeout', this._settings.get_default_value('leave-timeout'));
|
||||
this._builder.get_object('leave_timeout_spinbutton').set_value(this._settings.get_int('leave-timeout'));
|
||||
|
||||
this._settings.set_value('window-preview-hide-immediate-click', this._settings.get_default_value('window-preview-hide-immediate-click'));
|
||||
|
||||
this._settings.set_value('window-preview-animation-time', this._settings.get_default_value('window-preview-animation-time'));
|
||||
this._builder.get_object('animation_time_spinbutton').set_value(this._settings.get_int('window-preview-animation-time'));
|
||||
|
||||
|
||||
@@ -471,6 +471,11 @@
|
||||
<summary>Aspect ratio Y</summary>
|
||||
<description>The window previews respected aspect ratio Y.</description>
|
||||
</key>
|
||||
<key type="b" name="window-preview-hide-immediate-click">
|
||||
<default>false</default>
|
||||
<summary>Immediate hide on icon click</summary>
|
||||
<description>The window previews immediately hide when an application icon is clicked.</description>
|
||||
</key>
|
||||
<key type="b" name="isolate-workspaces">
|
||||
<default>false</default>
|
||||
<summary>Provide workspace isolation</summary>
|
||||
|
||||
Reference in New Issue
Block a user