mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
configure hiding of activities button
This commit is contained in:
@@ -15,6 +15,7 @@ make install
|
||||
</pre>
|
||||
to install the extension in your home directory. A Shell reload is required <code>Alt+F2 r Enter</code> and the extension has to be enabled with *gnome-tweak-tool* or with *dconf*.
|
||||
|
||||
**I recommend to set Top Bar > Show Applications Menu off in Gnome Tweak Tool.** This will cause the applications menu for native gnome apps (which normally appears in the top bar) to be presented in the top left of the window.
|
||||
|
||||
## Bug Reporting
|
||||
|
||||
|
||||
44
Settings.ui
44
Settings.ui
@@ -722,6 +722,50 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="show_activities_button_row">
|
||||
<property name="width_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="show_activities_button_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_activities_button_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_activities_button_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">Show Activities Button</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>
|
||||
|
||||
12
panel.js
12
panel.js
@@ -75,6 +75,7 @@ const taskbarPanel = new Lang.Class({
|
||||
this._oldLeftBoxStyle = this.panel._leftBox.get_style();
|
||||
this._oldCenterBoxStyle = this.panel._centerBox.get_style();
|
||||
this._oldRightBoxStyle = this.panel._rightBox.get_style();
|
||||
this._setActivitiesButtonVisible(this._dtpSettings.get_boolean('show-activities-button'));
|
||||
this._setTraySize(this._dtpSettings.get_int('tray-size'));
|
||||
this._setLeftBoxSize(this._dtpSettings.get_int('tray-size'));
|
||||
this._setClockLocation(this._dtpSettings.get_string('location-clock'));
|
||||
@@ -144,6 +145,7 @@ const taskbarPanel = new Lang.Class({
|
||||
this.panelBox.set_anchor_point(0, 0);
|
||||
Main.overview._overview.remove_child(this._myPanelGhost);
|
||||
Main.overview._panelGhost.set_height(this._oldPanelHeight);
|
||||
this._setActivitiesButtonVisible(true);
|
||||
this._setTraySize(0);
|
||||
this._setLeftBoxSize(0);
|
||||
this._setClockLocation("NATURAL");
|
||||
@@ -168,6 +170,10 @@ const taskbarPanel = new Lang.Class({
|
||||
this._setPanelStyle();
|
||||
}));
|
||||
|
||||
this._dtpSettings.connect('changed::show-activities-button', Lang.bind(this, function() {
|
||||
this._setActivitiesButtonVisible(this._dtpSettings.get_boolean('show-activities-button'));
|
||||
}));
|
||||
|
||||
this._dtpSettings.connect('changed::tray-size', Lang.bind(this, function() {
|
||||
this._setTraySize(this._dtpSettings.get_int('tray-size'));
|
||||
}));
|
||||
@@ -256,6 +262,12 @@ const taskbarPanel = new Lang.Class({
|
||||
this.panelBox.set_anchor_point(0,(-1)*(Main.layoutManager.primaryMonitor.height-this.panelBox.height));
|
||||
},
|
||||
|
||||
_setActivitiesButtonVisible: function(isVisible) {
|
||||
if(this.panel.statusArea['activities'])
|
||||
isVisible ? this.panel.statusArea['activities'].actor.show() :
|
||||
this.panel.statusArea['activities'].actor.hide();
|
||||
},
|
||||
|
||||
_setTraySize: function(size) {
|
||||
size ? this.panel._centerBox.set_style("font-size: " + size + "px;" + (this._oldCenterBoxStyle || "")) : this.panel._centerBox.set_style(this._oldCenterBoxStyle);
|
||||
size ? this.panel._rightBox.set_style("font-size: " + size + "px;" + (this._oldRightBoxStyle || "")) : this.panel._rightBox.set_style(this._oldRightBoxStyle);
|
||||
|
||||
4
prefs.js
4
prefs.js
@@ -139,6 +139,10 @@ const Settings = new Lang.Class({
|
||||
this._builder.get_object('application_button_animation_button'),
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
this._settings.bind('show-activities-button',
|
||||
this._builder.get_object('show_activities_button_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
this._settings.bind('isolate-workspaces',
|
||||
this._builder.get_object('isolate_workspaces_switch'),
|
||||
'active',
|
||||
|
||||
@@ -54,10 +54,15 @@
|
||||
<summary>Animate Show Applications from the desktop</summary>
|
||||
<description>Animate Show Applications from the desktop</description>
|
||||
</key>
|
||||
<key type="b" name="show-activities-button">
|
||||
<default>false</default>
|
||||
<summary>Show activities button</summary>
|
||||
<description>Show activities button on the left hand side of the taskbar</description>
|
||||
</key>
|
||||
<key type="b" name="isolate-workspaces">
|
||||
<default>false</default>
|
||||
<summary>Provide workspace isolation</summary>
|
||||
<description>Dash shows only windows from the currentworkspace</description>
|
||||
<description>Dash shows only windows from the current workspace</description>
|
||||
</key>
|
||||
<key type="b" name="customize-click">
|
||||
<default>true</default>
|
||||
|
||||
Reference in New Issue
Block a user