mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +09:00
Add option to open panel menu buttons on click only
This commit is contained in:
25
Settings.ui
25
Settings.ui
@@ -6040,6 +6040,31 @@
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="stockgs_panelbtn_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">Activate panel menu buttons (e.g. date menu) on click only</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="GtkSwitch" id="stockgs_panelbtn_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">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
9
panel.js
9
panel.js
@@ -136,6 +136,13 @@ var dtpPanelWrapper = new Lang.Class({
|
||||
}
|
||||
}
|
||||
|
||||
this.panel.menuManager._oldChangeMenu = this.panel.menuManager._changeMenu;
|
||||
this.panel.menuManager._changeMenu = (menu) => {
|
||||
if (!this._dtpSettings.get_boolean('stockgs-panelbtn-click-only')) {
|
||||
this.panel.menuManager._oldChangeMenu(menu);
|
||||
}
|
||||
};
|
||||
|
||||
if(this.appMenu)
|
||||
this.panel._leftBox.remove_child(this.appMenu.container);
|
||||
|
||||
@@ -292,6 +299,8 @@ var dtpPanelWrapper = new Lang.Class({
|
||||
this._injectionsHandler.destroy();
|
||||
}
|
||||
|
||||
this.panel.menuManager._changeMenu = this.panel.menuManager._oldChangeMenu;
|
||||
|
||||
if (!this.isSecondary) {
|
||||
this.panel.actor.set_height(this._oldPanelHeight);
|
||||
|
||||
|
||||
5
prefs.js
5
prefs.js
@@ -1409,6 +1409,11 @@ const Settings = new Lang.Class({
|
||||
this._builder.get_object('stockgs_dash_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
this._settings.bind('stockgs-panelbtn-click-only',
|
||||
this._builder.get_object('stockgs_panelbtn_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
// About Panel
|
||||
|
||||
|
||||
@@ -165,6 +165,11 @@
|
||||
<summary>Keep dash</summary>
|
||||
<description>Whether to keep the stock gnome-shell dash while in overview</description>
|
||||
</key>
|
||||
<key type="b" name="stockgs-panelbtn-click-only">
|
||||
<default>false</default>
|
||||
<summary>Panel menu buttons require click</summary>
|
||||
<description>Whether to activate the panel menu buttons on hover or on click</description>
|
||||
</key>
|
||||
<key name="location-clock" enum="org.gnome.shell.extensions.dash-to-panel.statusAreaPosition">
|
||||
<default>'STATUSLEFT'</default>
|
||||
<summary>Location of the clock</summary>
|
||||
|
||||
Reference in New Issue
Block a user