mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Option to hide window previews for #7
This commit is contained in:
44
Settings.ui
44
Settings.ui
@@ -784,6 +784,50 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="show_window_previews">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="show_window_previews_grid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">12</property>
|
||||
<property name="margin_right">12</property>
|
||||
<property name="margin_top">12</property>
|
||||
<property name="margin_bottom">12</property>
|
||||
<property name="column_spacing">32</property>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="show_window_previews_switch">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="halign">end</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="show_window_previews_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">Show window previews on hover</property>
|
||||
<property name="use_markup">True</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="isolate_workspaces_row">
|
||||
<property name="width_request">100</property>
|
||||
|
||||
4
prefs.js
4
prefs.js
@@ -147,6 +147,10 @@ const Settings = new Lang.Class({
|
||||
this._builder.get_object('show_activities_button_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
this._settings.bind('show-window-previews',
|
||||
this._builder.get_object('show_window_previews_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
this._settings.bind('isolate-workspaces',
|
||||
this._builder.get_object('isolate_workspaces_switch'),
|
||||
'active',
|
||||
|
||||
@@ -59,6 +59,11 @@
|
||||
<summary>Show activities button</summary>
|
||||
<description>Show activities button on the left hand side of the taskbar</description>
|
||||
</key>
|
||||
<key type="b" name="show-window-previews">
|
||||
<default>true</default>
|
||||
<summary>Show window preview</summary>
|
||||
<description>Show preview of running window on hover of app icon</description>
|
||||
</key>
|
||||
<key type="b" name="isolate-workspaces">
|
||||
<default>false</default>
|
||||
<summary>Provide workspace isolation</summary>
|
||||
|
||||
@@ -1212,8 +1212,8 @@ const taskbarAppIcon = new Lang.Class({
|
||||
},
|
||||
|
||||
shouldShowTooltip: function() {
|
||||
let windows = getInterestingWindows(this.app, this._dtpSettings);
|
||||
if (windows.length > 0) {
|
||||
if (this._dtpSettings.get_boolean("show-window-previews") &&
|
||||
getInterestingWindows(this.app, this._dtpSettings).length > 0) {
|
||||
return false;
|
||||
} else {
|
||||
return this.actor.hover && (!this._menu || !this._menu.isOpen) && (!this._windowPreview || !this._windowPreview.isOpen);
|
||||
|
||||
@@ -134,7 +134,7 @@ const thumbnailPreviewMenu = new Lang.Class({
|
||||
},
|
||||
|
||||
hoverOpen: function () {
|
||||
if (this.shouldOpen && !this.isOpen) {
|
||||
if (this.shouldOpen && !this.isOpen && this._dtpSettings.get_boolean("show-window-previews")) {
|
||||
this.popup();
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user