mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Merge branch 'master'
This commit is contained in:
@@ -171,16 +171,17 @@ Ideas for recursing child actors and assigning inline styles are based on code f
|
|||||||
- @jordanribera for using icon's dominant color as running indicator color
|
- @jordanribera for using icon's dominant color as running indicator color
|
||||||
- @tper0700 for dynamically building context menu based on system capabilities
|
- @tper0700 for dynamically building context menu based on system capabilities
|
||||||
- @levacic for configurable minimized application title font color
|
- @levacic for configurable minimized application title font color
|
||||||
- @ l3nn4rt for toggling workspace switch popup
|
- @l3nn4rt for toggling workspace switch popup
|
||||||
|
- @hlechner for adjustable show desktop line color and window preview icon size
|
||||||
|
|
||||||
#### Bug Fixes:
|
#### Bug Fixes:
|
||||||
@imrvelj, @Teslator, @bil-elmoussaoui, @brandon-schumann, @sw9, @rockon999 , @lexruee, @3v1n0, @freeroot, @moqmar, @ArtyomZorin, @lkc0987, @saibotk, @vanillajonathan, @Zkdc, @leebickmtu
|
@imrvelj, @Teslator, @bil-elmoussaoui, @brandon-schumann, @sw9, @rockon999 , @lexruee, @3v1n0, @freeroot, @moqmar, @ArtyomZorin, @lkc0987, @saibotk, @vanillajonathan, @Zkdc, @leebickmtu, @l3nn4rt, @Melix19
|
||||||
|
|
||||||
#### Documentation Improvements:
|
#### Documentation Improvements:
|
||||||
@BoQsc, @zakkak, @dandv
|
@BoQsc, @zakkak, @dandv
|
||||||
|
|
||||||
#### Translations:
|
#### Translations:
|
||||||
@frnogueira (pt_BR), @zeten30 (cs), @franglais125 / @calotam / @oeramirez (es), @LaurentTreguier / @SolarLiner (fr), @elsieholmes (uk), @hosiet (zh\_CN), @jonnius / @linuxr01 (de), @urbalazs / @pappfer (hu), @crayxt (kk), @pkomur / @MartinPL / @alex4401 (pl), @AlexGluck / @GoodNike / @rjapolov (ru), @sicklylife-jp / @ryonakano (ja), @oltulu / @TeknoMobil / @daenney (tr), @sbadux / @kowalski7cc (it), @OriginCode / @pan93412 (zh\_TW), @ojn (sv)
|
@frnogueira (pt_BR), @zeten30 (cs), @franglais125 / @calotam / @oeramirez (es), @LaurentTreguier / @SolarLiner (fr), @elsieholmes (uk), @hosiet (zh\_CN), @jonnius / @linuxr01 (de), @urbalazs / @pappfer (hu), @crayxt (kk), @pkomur / @MartinPL / @alex4401 (pl), @AlexGluck / @GoodNike / @rjapolov (ru), @sicklylife-jp / @ryonakano (ja), @oltulu / @TeknoMobil / @daenney (tr), @sbadux / @kowalski7cc / @l3nn4rt (it), @OriginCode / @pan93412 (zh\_TW), @ojn (sv), @frandieguez (gl)
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|||||||
197
Settings.ui
197
Settings.ui
@@ -2101,6 +2101,12 @@
|
|||||||
<property name="step_increment">1</property>
|
<property name="step_increment">1</property>
|
||||||
<property name="page_increment">100</property>
|
<property name="page_increment">100</property>
|
||||||
</object>
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="preview_custom_icon_size_adjustment">
|
||||||
|
<property name="lower">8</property>
|
||||||
|
<property name="upper">48</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">100</property>
|
||||||
|
</object>
|
||||||
<object class="GtkScrolledWindow" id="box_window_preview_options">
|
<object class="GtkScrolledWindow" id="box_window_preview_options">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
@@ -2752,6 +2758,92 @@
|
|||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkGrid" id="grid_preview_custom_icon_size">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="margin_top">12</property>
|
||||||
|
<property name="column_spacing">32</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkBox">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="spacing">8</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSwitch" id="preview_custom_icon_size_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="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="preview_custom_icon_size_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">6</property>
|
||||||
|
<property name="adjustment">preview_custom_icon_size_adjustment</property>
|
||||||
|
<property name="numeric">True</property>
|
||||||
|
<property name="value">6</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="preview_custom_icon_size_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="label" translatable="yes">Icon size (px) of the window preview</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>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="preview_custom_icon_size_description">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="label" translatable="yes">If disabled, the previews icon size will be based on headerbar size</property>
|
||||||
|
<property name="wrap">True</property>
|
||||||
|
<property name="max_width_chars">40</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<style>
|
||||||
|
<class name="dim-label"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkGrid" id="grid_preview_title_size">
|
<object class="GtkGrid" id="grid_preview_title_size">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
@@ -2791,7 +2883,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">1</property>
|
<property name="top_attach">2</property>
|
||||||
<property name="width">2</property>
|
<property name="width">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
@@ -2836,7 +2928,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">2</property>
|
<property name="top_attach">3</property>
|
||||||
<property name="width">2</property>
|
<property name="width">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
@@ -2875,7 +2967,7 @@
|
|||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">3</property>
|
<property name="top_attach">4</property>
|
||||||
<property name="width">2</property>
|
<property name="width">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
@@ -3977,6 +4069,7 @@
|
|||||||
<property name="margin_right">12</property>
|
<property name="margin_right">12</property>
|
||||||
<property name="margin_top">12</property>
|
<property name="margin_top">12</property>
|
||||||
<property name="margin_bottom">12</property>
|
<property name="margin_bottom">12</property>
|
||||||
|
<property name="row_spacing">4</property>
|
||||||
<property name="column_spacing">32</property>
|
<property name="column_spacing">32</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="show_showdesktop_width_label">
|
<object class="GtkLabel" id="show_showdesktop_width_label">
|
||||||
@@ -4006,6 +4099,59 @@
|
|||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="override_show_desktop_line_color_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="label" translatable="yes">Override Show Desktop line color</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="GtkBox" id="override_show_desktop_line_color_box">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<property name="halign">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkColorButton" id="override_show_desktop_line_color_colorbutton">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="halign">end</property>
|
||||||
|
<property name="use_alpha">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSwitch" id="override_show_desktop_line_color_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="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
@@ -6212,6 +6358,51 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkListBoxRow" id="clicktoexit_row">
|
||||||
|
<property name="width_request">100</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkGrid" id="clicktoexit_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="row_spacing">6</property>
|
||||||
|
<property name="column_spacing">32</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSwitch" id="clicktoexit_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="clicktoexit_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="label" translatable="yes">Click empty space to close overview</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>
|
<child>
|
||||||
<object class="GtkListBoxRow" id="group_apps_row">
|
<object class="GtkListBoxRow" id="group_apps_row">
|
||||||
<property name="width_request">100</property>
|
<property name="width_request">100</property>
|
||||||
|
|||||||
27
appIcons.js
27
appIcons.js
@@ -150,7 +150,7 @@ var taskbarAppIcon = Utils.defineClass({
|
|||||||
|
|
||||||
this._container = new St.Widget({ style_class: 'dtp-container', layout_manager: new Clutter.BinLayout() });
|
this._container = new St.Widget({ style_class: 'dtp-container', layout_manager: new Clutter.BinLayout() });
|
||||||
this._dotsContainer = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
this._dotsContainer = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||||
this._dtpIconContainer = new St.Widget({ layout_manager: new Clutter.BinLayout(), style: this.getIconContainerStyle() });
|
this._dtpIconContainer = new St.Widget({ layout_manager: new Clutter.BinLayout(), style: getIconContainerStyle(panel.checkIfVertical()) });
|
||||||
|
|
||||||
this.actor.remove_actor(this._iconContainer);
|
this.actor.remove_actor(this._iconContainer);
|
||||||
|
|
||||||
@@ -1224,19 +1224,6 @@ var taskbarAppIcon = Utils.defineClass({
|
|||||||
|
|
||||||
getAppIconInterestingWindows: function(isolateMonitors) {
|
getAppIconInterestingWindows: function(isolateMonitors) {
|
||||||
return getInterestingWindows(this.app, this.dtpPanel.monitor, isolateMonitors);
|
return getInterestingWindows(this.app, this.dtpPanel.monitor, isolateMonitors);
|
||||||
},
|
|
||||||
|
|
||||||
getIconContainerStyle: function() {
|
|
||||||
let style = 'padding: ';
|
|
||||||
let isVertical = this.dtpPanel.checkIfVertical();
|
|
||||||
|
|
||||||
if (Me.settings.get_boolean('group-apps')) {
|
|
||||||
style += (isVertical ? '0;' : '0 ' + DEFAULT_PADDING_SIZE + 'px;');
|
|
||||||
} else {
|
|
||||||
style += (isVertical ? '' : '0 ') + DEFAULT_PADDING_SIZE + 'px;';
|
|
||||||
}
|
|
||||||
|
|
||||||
return style;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
taskbarAppIcon.prototype.scaleAndFade = taskbarAppIcon.prototype.undoScaleAndFade = () => {};
|
taskbarAppIcon.prototype.scaleAndFade = taskbarAppIcon.prototype.undoScaleAndFade = () => {};
|
||||||
@@ -1885,3 +1872,15 @@ adjustMenuRedisplay(MyShowAppsIconMenu.prototype);
|
|||||||
function adjustMenuRedisplay(menuProto) {
|
function adjustMenuRedisplay(menuProto) {
|
||||||
menuProto[menuRedisplayFunc] = function() { this._dtpRedisplay(menuRedisplayFunc) };
|
menuProto[menuRedisplayFunc] = function() { this._dtpRedisplay(menuRedisplayFunc) };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var getIconContainerStyle = function(isVertical) {
|
||||||
|
let style = 'padding: ';
|
||||||
|
|
||||||
|
if (Me.settings.get_boolean('group-apps')) {
|
||||||
|
style += (isVertical ? '0;' : '0 ' + DEFAULT_PADDING_SIZE + 'px;');
|
||||||
|
} else {
|
||||||
|
style += (isVertical ? '' : '0 ') + DEFAULT_PADDING_SIZE + 'px;';
|
||||||
|
}
|
||||||
|
|
||||||
|
return style;
|
||||||
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"uuid": "dash-to-panel@jderose9.github.com",
|
"uuid": "dash-to-panel@jderose9.github.com",
|
||||||
"name": "Dash to Panel",
|
"name": "Dash to Panel",
|
||||||
"description": "An icon taskbar for the Gnome Shell. This extension moves the dash into the gnome main panel so that the application launchers and system tray are combined into a single panel, similar to that found in KDE Plasma and Windows 7+. A separate dock is no longer needed for easy access to running and favorited applications.\n\nFor a more traditional experience, you may also want to use Tweak Tool to enable Windows > Titlebar Buttons > Minimize & Maximize.\n\nFor the best support, please report any issues on Github. Dash-to-panel is developed and maintained by @jderose9 and @charlesg99.",
|
"description": "An icon taskbar for the Gnome Shell. This extension moves the dash into the gnome main panel so that the application launchers and system tray are combined into a single panel, similar to that found in KDE Plasma and Windows 7+. A separate dock is no longer needed for easy access to running and favorited applications.\n\nFor a more traditional experience, you may also want to use Tweak Tool to enable Windows > Titlebar Buttons > Minimize & Maximize.\n\nFor the best support, please report any issues on Github. Dash-to-panel is developed and maintained by @jderose9 and @charlesg99.",
|
||||||
"shell-version": [ "3.18", "3.20", "3.22", "3.24", "3.26", "3.28", "3.30", "3.32", "3.34", "3.36" ],
|
"shell-version": [ "3.18", "3.20", "3.22", "3.24", "3.26", "3.28", "3.30", "3.32", "3.34", "3.36", "3.38" ],
|
||||||
"url": "https://github.com/jderose9/dash-to-panel",
|
"url": "https://github.com/jderose9/dash-to-panel",
|
||||||
"gettext-domain": "dash-to-panel",
|
"gettext-domain": "dash-to-panel",
|
||||||
"version": 9999
|
"version": 9999
|
||||||
|
|||||||
144
overview.js
144
overview.js
@@ -32,16 +32,22 @@ const Gtk = imports.gi.Gtk;
|
|||||||
const Gdk = imports.gi.Gdk;
|
const Gdk = imports.gi.Gdk;
|
||||||
const Gio = imports.gi.Gio;
|
const Gio = imports.gi.Gio;
|
||||||
const Mainloop = imports.mainloop;
|
const Mainloop = imports.mainloop;
|
||||||
|
const IconGrid = imports.ui.iconGrid;
|
||||||
|
const ViewSelector = imports.ui.viewSelector;
|
||||||
|
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
|
|
||||||
const GS_HOTKEYS_KEY = 'switch-to-application-';
|
const GS_HOTKEYS_KEY = 'switch-to-application-';
|
||||||
|
|
||||||
|
//timeout names
|
||||||
|
const T1 = 'swipeEndTimeout';
|
||||||
|
|
||||||
var dtpOverview = Utils.defineClass({
|
var dtpOverview = Utils.defineClass({
|
||||||
Name: 'DashToPanel.Overview',
|
Name: 'DashToPanel.Overview',
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this._numHotkeys = 10;
|
this._numHotkeys = 10;
|
||||||
|
this._timeoutsHandler = new Utils.TimeoutsHandler();
|
||||||
},
|
},
|
||||||
|
|
||||||
enable : function(panel) {
|
enable : function(panel) {
|
||||||
@@ -54,8 +60,9 @@ var dtpOverview = Utils.defineClass({
|
|||||||
this._optionalWorkspaceIsolation();
|
this._optionalWorkspaceIsolation();
|
||||||
this._optionalHotKeys();
|
this._optionalHotKeys();
|
||||||
this._optionalNumberOverlay();
|
this._optionalNumberOverlay();
|
||||||
|
this._optionalClickToExit();
|
||||||
this._toggleDash();
|
this._toggleDash();
|
||||||
|
|
||||||
this._signalsHandler.add([
|
this._signalsHandler.add([
|
||||||
Me.settings,
|
Me.settings,
|
||||||
'changed::stockgs-keep-dash',
|
'changed::stockgs-keep-dash',
|
||||||
@@ -72,6 +79,7 @@ var dtpOverview = Utils.defineClass({
|
|||||||
// Remove key bindings
|
// Remove key bindings
|
||||||
this._disableHotKeys();
|
this._disableHotKeys();
|
||||||
this._disableExtraShortcut();
|
this._disableExtraShortcut();
|
||||||
|
this._disableClickToExit();
|
||||||
},
|
},
|
||||||
|
|
||||||
_toggleDash: function(visible) {
|
_toggleDash: function(visible) {
|
||||||
@@ -390,5 +398,139 @@ var dtpOverview = Utils.defineClass({
|
|||||||
|
|
||||||
this._panel.intellihide.release(Intellihide.Hold.TEMPORARY);
|
this._panel.intellihide.release(Intellihide.Hold.TEMPORARY);
|
||||||
}));
|
}));
|
||||||
|
},
|
||||||
|
|
||||||
|
_optionalClickToExit: function() {
|
||||||
|
this._clickToExitEnabled = false;
|
||||||
|
if (Me.settings.get_boolean('overview-click-to-exit'))
|
||||||
|
this._enableClickToExit();
|
||||||
|
|
||||||
|
this._signalsHandler.add([
|
||||||
|
Me.settings,
|
||||||
|
'changed::overview-click-to-exit',
|
||||||
|
Lang.bind(this, function() {
|
||||||
|
if (Me.settings.get_boolean('overview-click-to-exit'))
|
||||||
|
Lang.bind(this, this._enableClickToExit)();
|
||||||
|
else
|
||||||
|
Lang.bind(this, this._disableClickToExit)();
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
},
|
||||||
|
|
||||||
|
_enableClickToExit: function() {
|
||||||
|
if (this._clickToExitEnabled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let views = Utils.getAppDisplayViews();
|
||||||
|
this._oldOverviewReactive = Main.overview._overview.reactive
|
||||||
|
|
||||||
|
Main.overview._overview.reactive = true;
|
||||||
|
|
||||||
|
this._clickAction = new Clutter.ClickAction();
|
||||||
|
this._clickAction.connect('clicked', () => {
|
||||||
|
|
||||||
|
if (this._swiping)
|
||||||
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
|
||||||
|
let [x, y] = global.get_pointer();
|
||||||
|
let pickedActor = global.stage.get_actor_at_pos(Clutter.PickMode.ALL, x, y);
|
||||||
|
|
||||||
|
let activePage = Main.overview.viewSelector.getActivePage();
|
||||||
|
if (activePage == ViewSelector.ViewPage.APPS) {
|
||||||
|
|
||||||
|
if(pickedActor != Main.overview._overview
|
||||||
|
&& (views.length > 1 && pickedActor != Main.overview.viewSelector.appDisplay._controls.get_parent())
|
||||||
|
&& pickedActor != (views[0].view.actor || views[0].view)
|
||||||
|
&& (views.length > 1 && pickedActor != views[1].view._scrollView)
|
||||||
|
&& (views.length > 1 && pickedActor != views[1].view._grid)) {
|
||||||
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(Me.settings.get_boolean('animate-show-apps')) {
|
||||||
|
let view = Utils.find(views, v => v.view.actor.visible).view;
|
||||||
|
view.animate(IconGrid.AnimationDirection.OUT, Lang.bind(this, function() {
|
||||||
|
Main.overview.viewSelector._appsPage.hide();
|
||||||
|
Main.overview.hide();
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
Main.overview.hide();
|
||||||
|
}
|
||||||
|
} else if (activePage == ViewSelector.ViewPage.WINDOWS) {
|
||||||
|
let overviewControls = Main.overview._overview._controls || Main.overview._controls;
|
||||||
|
|
||||||
|
if(pickedActor == overviewControls._thumbnailsBox
|
||||||
|
|| pickedActor == overviewControls.dash._container) {
|
||||||
|
return Clutter.EVENT_PROPAGATE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pickedActor instanceof Meta.BackgroundActor) {
|
||||||
|
Utils.find(overviewControls._thumbnailsBox._thumbnails, t =>
|
||||||
|
pickedActor == t._bgManager.backgroundActor
|
||||||
|
).activate();
|
||||||
|
return Clutter.EVENT_STOP;
|
||||||
|
}
|
||||||
|
|
||||||
|
Main.overview.toggle();
|
||||||
|
} else {
|
||||||
|
Main.overview.toggle();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
Main.overview._overview.add_action(this._clickAction);
|
||||||
|
|
||||||
|
[Main.overview.viewSelector._workspacesDisplay].concat(views.map(v => v.view)).forEach(v => {
|
||||||
|
if (v._swipeTracker) {
|
||||||
|
this._signalsHandler.addWithLabel('clickToExit', [
|
||||||
|
v._swipeTracker,
|
||||||
|
'begin',
|
||||||
|
Lang.bind(this, this._onSwipeBegin)
|
||||||
|
],[
|
||||||
|
v._swipeTracker,
|
||||||
|
'end',
|
||||||
|
Lang.bind(this, this._onSwipeEnd)
|
||||||
|
]);
|
||||||
|
} else if (v._panAction) {
|
||||||
|
this._signalsHandler.addWithLabel('clickToExit', [
|
||||||
|
v._panAction,
|
||||||
|
'gesture-begin',
|
||||||
|
Lang.bind(this, this._onSwipeBegin)
|
||||||
|
],[
|
||||||
|
v._panAction,
|
||||||
|
'gesture-cancel',
|
||||||
|
Lang.bind(this, this._onSwipeEnd)
|
||||||
|
],[
|
||||||
|
v._panAction,
|
||||||
|
'gesture-end',
|
||||||
|
Lang.bind(this, this._onSwipeEnd)
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this._clickToExitEnabled = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
_disableClickToExit: function () {
|
||||||
|
if (!this._clickToExitEnabled)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Main.overview._overview.remove_action(this._clickAction);
|
||||||
|
Main.overview._overview.reactive = this._oldOverviewReactive;
|
||||||
|
|
||||||
|
this._signalsHandler.removeWithLabel('clickToExit');
|
||||||
|
|
||||||
|
this._clickToExitEnabled = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
_onSwipeBegin: function() {
|
||||||
|
this._swiping = true;
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
_onSwipeEnd: function() {
|
||||||
|
this._timeoutsHandler.add([
|
||||||
|
T1,
|
||||||
|
0,
|
||||||
|
() => this._swiping = false
|
||||||
|
]);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
120
panel.js
120
panel.js
@@ -221,18 +221,12 @@ var dtpPanel = Utils.defineClass({
|
|||||||
opacity: 0
|
opacity: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
if (this.geom.position == St.Side.TOP) {
|
let isTop = this.geom.position == St.Side.TOP;
|
||||||
|
|
||||||
|
if (isTop) {
|
||||||
this.panel._leftCorner = this.panel._leftCorner || new Panel.PanelCorner(St.Side.LEFT);
|
this.panel._leftCorner = this.panel._leftCorner || new Panel.PanelCorner(St.Side.LEFT);
|
||||||
this.panel._rightCorner = this.panel._rightCorner || new Panel.PanelCorner(St.Side.RIGHT);
|
this.panel._rightCorner = this.panel._rightCorner || new Panel.PanelCorner(St.Side.RIGHT);
|
||||||
|
|
||||||
Utils.wrapActor(this.panel._leftCorner || 0);
|
|
||||||
Utils.wrapActor(this.panel._rightCorner || 0);
|
|
||||||
|
|
||||||
if (this.isStandalone) {
|
|
||||||
this.panel.actor.add_child(this.panel._leftCorner.actor);
|
|
||||||
this.panel.actor.add_child(this.panel._rightCorner.actor);
|
|
||||||
}
|
|
||||||
|
|
||||||
Main.overview._overview.insert_child_at_index(this._myPanelGhost, 0);
|
Main.overview._overview.insert_child_at_index(this._myPanelGhost, 0);
|
||||||
} else {
|
} else {
|
||||||
let overviewControls = Main.overview._overview._controls || Main.overview._controls;
|
let overviewControls = Main.overview._overview._controls || Main.overview._controls;
|
||||||
@@ -246,6 +240,21 @@ var dtpPanel = Utils.defineClass({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.panel._leftCorner) {
|
||||||
|
Utils.wrapActor(this.panel._leftCorner);
|
||||||
|
Utils.wrapActor(this.panel._rightCorner);
|
||||||
|
|
||||||
|
if (isTop) {
|
||||||
|
if (this.isStandalone) {
|
||||||
|
this.panel.actor.add_child(this.panel._leftCorner.actor);
|
||||||
|
this.panel.actor.add_child(this.panel._rightCorner.actor);
|
||||||
|
}
|
||||||
|
} else if (Config.PACKAGE_VERSION >= '3.32') {
|
||||||
|
this.panel.actor.remove_child(this.panel._leftCorner.actor);
|
||||||
|
this.panel.actor.remove_child(this.panel._rightCorner.actor);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this._setPanelPosition();
|
this._setPanelPosition();
|
||||||
|
|
||||||
if (!this.isStandalone) {
|
if (!this.isStandalone) {
|
||||||
@@ -278,7 +287,7 @@ var dtpPanel = Utils.defineClass({
|
|||||||
panelBoxes.forEach(b => {
|
panelBoxes.forEach(b => {
|
||||||
this[b].allocate = (box, flags, isFromDashToPanel) => {
|
this[b].allocate = (box, flags, isFromDashToPanel) => {
|
||||||
if (isFromDashToPanel) {
|
if (isFromDashToPanel) {
|
||||||
this[b].__proto__.allocate.call(this[b], box, flags);
|
Utils.allocate(this[b], box, flags, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -482,6 +491,11 @@ var dtpPanel = Utils.defineClass({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this.panel._leftCorner.actor.mapped) {
|
||||||
|
this.panel.actor.add_child(this.panel._leftCorner.actor);
|
||||||
|
this.panel.actor.add_child(this.panel._rightCorner.actor);
|
||||||
|
}
|
||||||
|
|
||||||
this._setShowDesktopButton(false);
|
this._setShowDesktopButton(false);
|
||||||
|
|
||||||
delete Utils.getIndicators(this.statusArea.aggregateMenu._volume)._dtpIgnoreScroll;
|
delete Utils.getIndicators(this.statusArea.aggregateMenu._volume)._dtpIgnoreScroll;
|
||||||
@@ -666,6 +680,8 @@ var dtpPanel = Utils.defineClass({
|
|||||||
[
|
[
|
||||||
'changed::showdesktop-button-width',
|
'changed::showdesktop-button-width',
|
||||||
'changed::trans-use-custom-bg',
|
'changed::trans-use-custom-bg',
|
||||||
|
'changed::desktop-line-use-custom-color',
|
||||||
|
'changed::desktop-line-custom-color',
|
||||||
'changed::trans-bg-color'
|
'changed::trans-bg-color'
|
||||||
],
|
],
|
||||||
() => this._setShowDesktopButtonStyle()
|
() => this._setShowDesktopButtonStyle()
|
||||||
@@ -892,11 +908,11 @@ var dtpPanel = Utils.defineClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_mainPanelAllocate: function(actor, box, flags) {
|
_mainPanelAllocate: function(actor, box, flags) {
|
||||||
this.panel.actor.set_allocation(box, flags);
|
Utils.setAllocation(this.panel.actor, box, flags);
|
||||||
},
|
},
|
||||||
|
|
||||||
vfunc_allocate: function(box, flags) {
|
vfunc_allocate: function(box, flags) {
|
||||||
this.set_allocation(box, flags);
|
Utils.setAllocation(this, box, flags);
|
||||||
|
|
||||||
let fixed = 0;
|
let fixed = 0;
|
||||||
let centeredMonitorGroup;
|
let centeredMonitorGroup;
|
||||||
@@ -978,16 +994,14 @@ var dtpPanel = Utils.defineClass({
|
|||||||
currentPosition = group.tlOffset + startPosition;
|
currentPosition = group.tlOffset + startPosition;
|
||||||
|
|
||||||
group.elements.forEach(element => {
|
group.elements.forEach(element => {
|
||||||
let params = [element.box, flags];
|
|
||||||
|
|
||||||
element.box[this.varCoord.c1] = Math.round(currentPosition);
|
element.box[this.varCoord.c1] = Math.round(currentPosition);
|
||||||
element.box[this.varCoord.c2] = Math.round((currentPosition += element.natSize));
|
element.box[this.varCoord.c2] = Math.round((currentPosition += element.natSize));
|
||||||
|
|
||||||
if (element.isBox) {
|
if (element.isBox) {
|
||||||
params.push(1);
|
return element.actor.allocate(element.box, flags, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
element.actor.allocate.apply(element.actor, params);
|
Utils.allocate(element.actor, element.box, flags, false);
|
||||||
});
|
});
|
||||||
|
|
||||||
group[this.varCoord.c1] = startPosition;
|
group[this.varCoord.c1] = startPosition;
|
||||||
@@ -996,7 +1010,7 @@ var dtpPanel = Utils.defineClass({
|
|||||||
++fixed;
|
++fixed;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.panel.actor.allocate(panelAlloc, flags);
|
Utils.allocate(this.panel.actor, panelAlloc, flags);
|
||||||
|
|
||||||
this._elementGroups.forEach(group => {
|
this._elementGroups.forEach(group => {
|
||||||
group.fixed = 0;
|
group.fixed = 0;
|
||||||
@@ -1055,8 +1069,8 @@ var dtpPanel = Utils.defineClass({
|
|||||||
childBoxRightCorner[this.fixedCoord.c1] = panelAllocFixedSize;
|
childBoxRightCorner[this.fixedCoord.c1] = panelAllocFixedSize;
|
||||||
childBoxRightCorner[this.fixedCoord.c2] = panelAllocFixedSize + this.cornerSize;
|
childBoxRightCorner[this.fixedCoord.c2] = panelAllocFixedSize + this.cornerSize;
|
||||||
|
|
||||||
this.panel._leftCorner.actor.allocate(childBoxLeftCorner, flags);
|
Utils.allocate(this.panel._leftCorner.actor, childBoxLeftCorner, flags);
|
||||||
this.panel._rightCorner.actor.allocate(childBoxRightCorner, flags);
|
Utils.allocate(this.panel._rightCorner.actor, childBoxRightCorner, flags);
|
||||||
|
|
||||||
if (this.cornerSize != currentCornerSize) {
|
if (this.cornerSize != currentCornerSize) {
|
||||||
this._setPanelClip();
|
this._setPanelClip();
|
||||||
@@ -1276,8 +1290,8 @@ var dtpPanel = Utils.defineClass({
|
|||||||
this._showDesktopButton = new St.Bin({ style_class: 'showdesktop-button',
|
this._showDesktopButton = new St.Bin({ style_class: 'showdesktop-button',
|
||||||
reactive: true,
|
reactive: true,
|
||||||
can_focus: true,
|
can_focus: true,
|
||||||
x_fill: true,
|
// x_fill: true,
|
||||||
y_fill: true,
|
// y_fill: true,
|
||||||
track_hover: true });
|
track_hover: true });
|
||||||
|
|
||||||
this._setShowDesktopButtonStyle();
|
this._setShowDesktopButtonStyle();
|
||||||
@@ -1320,12 +1334,16 @@ var dtpPanel = Utils.defineClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_setShowDesktopButtonStyle: function() {
|
_setShowDesktopButtonStyle: function() {
|
||||||
let rgb = this._getBackgroundBrightness() ? "55, 55, 55" : "200, 200, 200";
|
let rgb = this._getBackgroundBrightness() ? "rgba(55, 55, 55, .2)" : "rgba(200, 200, 200, .2)";
|
||||||
|
|
||||||
|
let isLineCustom = Me.settings.get_boolean('desktop-line-use-custom-color');
|
||||||
|
rgb = isLineCustom ? Me.settings.get_string('desktop-line-custom-color') : rgb;
|
||||||
|
|
||||||
if (this._showDesktopButton) {
|
if (this._showDesktopButton) {
|
||||||
let buttonSize = Me.settings.get_int('showdesktop-button-width') + 'px;';
|
let buttonSize = Me.settings.get_int('showdesktop-button-width') + 'px;';
|
||||||
let isVertical = this.checkIfVertical();
|
let isVertical = this.checkIfVertical();
|
||||||
let sytle = "border: 0 solid rgba(" + rgb + ", .2);"
|
|
||||||
|
let sytle = "border: 0 solid " + rgb + ";";
|
||||||
sytle += isVertical ? 'border-top-width:1px;height:' + buttonSize : 'border-left-width:1px;width:' + buttonSize;
|
sytle += isVertical ? 'border-top-width:1px;height:' + buttonSize : 'border-left-width:1px;width:' + buttonSize;
|
||||||
|
|
||||||
this._showDesktopButton.set_style(sytle);
|
this._showDesktopButton.set_style(sytle);
|
||||||
@@ -1335,12 +1353,7 @@ var dtpPanel = Utils.defineClass({
|
|||||||
|
|
||||||
// _getBackgroundBrightness: return true if panel has a bright background color
|
// _getBackgroundBrightness: return true if panel has a bright background color
|
||||||
_getBackgroundBrightness: function() {
|
_getBackgroundBrightness: function() {
|
||||||
let rgb = this.dynamicTransparency.currentBackgroundColor;
|
return Utils.checkIfColorIsBright(this.dynamicTransparency.backgroundColorRgb);
|
||||||
rgb = rgb.substring(5, rgb.length-3).split(',');
|
|
||||||
|
|
||||||
let brightness = 0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2];
|
|
||||||
|
|
||||||
return (brightness > 128) ? true : false;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_toggleWorkspaceWindows: function(hide, workspace) {
|
_toggleWorkspaceWindows: function(hide, workspace) {
|
||||||
@@ -1461,7 +1474,7 @@ var dtpSecondaryPanel = Utils.defineClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
vfunc_allocate: function(box, flags) {
|
vfunc_allocate: function(box, flags) {
|
||||||
this.set_allocation(box, flags);
|
Utils.setAllocation(this, box, flags);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1482,44 +1495,36 @@ var dtpSecondaryAggregateMenu = Utils.defineClass({
|
|||||||
this._indicators = new St.BoxLayout({ style_class: 'panel-status-indicators-box' });
|
this._indicators = new St.BoxLayout({ style_class: 'panel-status-indicators-box' });
|
||||||
this.actor.add_child(this._indicators);
|
this.actor.add_child(this._indicators);
|
||||||
|
|
||||||
if (Config.HAVE_NETWORKMANAGER && Config.PACKAGE_VERSION >= '3.24') {
|
|
||||||
this._network = new imports.ui.status.network.NMApplet();
|
|
||||||
} else {
|
|
||||||
this._network = null;
|
|
||||||
}
|
|
||||||
if (Config.HAVE_BLUETOOTH) {
|
|
||||||
this._bluetooth = new imports.ui.status.bluetooth.Indicator();
|
|
||||||
} else {
|
|
||||||
this._bluetooth = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
this._power = new imports.ui.status.power.Indicator();
|
this._power = new imports.ui.status.power.Indicator();
|
||||||
this._volume = new imports.ui.status.volume.Indicator();
|
this._volume = new imports.ui.status.volume.Indicator();
|
||||||
this._brightness = new imports.ui.status.brightness.Indicator();
|
this._brightness = new imports.ui.status.brightness.Indicator();
|
||||||
this._system = new imports.ui.status.system.Indicator();
|
this._system = new imports.ui.status.system.Indicator();
|
||||||
this._screencast = new imports.ui.status.screencast.Indicator();
|
|
||||||
|
if (Config.PACKAGE_VERSION >= '3.28') {
|
||||||
|
this._thunderbolt = new imports.ui.status.thunderbolt.Indicator();
|
||||||
|
this._indicators.add_child(Utils.getIndicators(this._thunderbolt));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Config.PACKAGE_VERSION < '3.37') {
|
||||||
|
this._screencast = new imports.ui.status.screencast.Indicator();
|
||||||
|
this._indicators.add_child(Utils.getIndicators(this._screencast));
|
||||||
|
}
|
||||||
|
|
||||||
if (Config.PACKAGE_VERSION >= '3.24') {
|
if (Config.PACKAGE_VERSION >= '3.24') {
|
||||||
this._nightLight = new imports.ui.status.nightLight.Indicator();
|
this._nightLight = new imports.ui.status.nightLight.Indicator();
|
||||||
}
|
|
||||||
|
|
||||||
if (Config.PACKAGE_VERSION >= '3.28') {
|
|
||||||
this._thunderbolt = new imports.ui.status.thunderbolt.Indicator();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this._thunderbolt) {
|
|
||||||
this._indicators.add_child(Utils.getIndicators(this._thunderbolt));
|
|
||||||
}
|
|
||||||
this._indicators.add_child(Utils.getIndicators(this._screencast));
|
|
||||||
if (this._nightLight) {
|
|
||||||
this._indicators.add_child(Utils.getIndicators(this._nightLight));
|
this._indicators.add_child(Utils.getIndicators(this._nightLight));
|
||||||
}
|
}
|
||||||
if (this._network) {
|
|
||||||
|
if (Config.HAVE_NETWORKMANAGER && Config.PACKAGE_VERSION >= '3.24') {
|
||||||
|
this._network = new imports.ui.status.network.NMApplet();
|
||||||
this._indicators.add_child(Utils.getIndicators(this._network));
|
this._indicators.add_child(Utils.getIndicators(this._network));
|
||||||
}
|
}
|
||||||
if (this._bluetooth) {
|
|
||||||
|
if (Config.HAVE_BLUETOOTH) {
|
||||||
|
this._bluetooth = new imports.ui.status.bluetooth.Indicator();
|
||||||
this._indicators.add_child(Utils.getIndicators(this._bluetooth));
|
this._indicators.add_child(Utils.getIndicators(this._bluetooth));
|
||||||
}
|
}
|
||||||
|
|
||||||
this._indicators.add_child(Utils.getIndicators(this._volume));
|
this._indicators.add_child(Utils.getIndicators(this._volume));
|
||||||
this._indicators.add_child(Utils.getIndicators(this._power));
|
this._indicators.add_child(Utils.getIndicators(this._power));
|
||||||
this._indicators.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
|
this._indicators.add_child(PopupMenu.arrowIcon(St.Side.BOTTOM));
|
||||||
@@ -1530,18 +1535,23 @@ var dtpSecondaryAggregateMenu = Utils.defineClass({
|
|||||||
|
|
||||||
this.menu.addMenuItem(this._brightness.menu);
|
this.menu.addMenuItem(this._brightness.menu);
|
||||||
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
|
|
||||||
if (this._network) {
|
if (this._network) {
|
||||||
this.menu.addMenuItem(this._network.menu);
|
this.menu.addMenuItem(this._network.menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._bluetooth) {
|
if (this._bluetooth) {
|
||||||
this.menu.addMenuItem(this._bluetooth.menu);
|
this.menu.addMenuItem(this._bluetooth.menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.menu.addMenuItem(this._power.menu);
|
this.menu.addMenuItem(this._power.menu);
|
||||||
this._power._sync();
|
this._power._sync();
|
||||||
|
|
||||||
if (this._nightLight) {
|
if (this._nightLight) {
|
||||||
this.menu.addMenuItem(this._nightLight.menu);
|
this.menu.addMenuItem(this._nightLight.menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.menu.addMenuItem(new PopupMenu.PopupSeparatorMenuItem());
|
||||||
this.menu.addMenuItem(this._system.menu);
|
this.menu.addMenuItem(this._system.menu);
|
||||||
|
|
||||||
menuLayout.addSizeChild(this._power.menu.actor);
|
menuLayout.addSizeChild(this._power.menu.actor);
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ var dtpPanelManager = Utils.defineClass({
|
|||||||
|
|
||||||
this._saveMonitors();
|
this._saveMonitors();
|
||||||
|
|
||||||
Main.overview.viewSelector.appDisplay._views.forEach(v => {
|
Utils.getAppDisplayViews().forEach(v => {
|
||||||
Utils.wrapActor(v.view);
|
Utils.wrapActor(v.view);
|
||||||
Utils.wrapActor(v.view._grid);
|
Utils.wrapActor(v.view._grid);
|
||||||
});
|
});
|
||||||
@@ -198,20 +198,25 @@ var dtpPanelManager = Utils.defineClass({
|
|||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
Main.overview.viewSelector.appDisplay._views.forEach(v => {
|
Utils.getAppDisplayViews().forEach(v => {
|
||||||
if (v.control.has_style_pseudo_class('checked')) {
|
if (!v.control || v.control.has_style_pseudo_class('checked')) {
|
||||||
currentAppsView = v;
|
currentAppsView = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (v.control) {
|
||||||
|
this._signalsHandler.add(
|
||||||
|
[
|
||||||
|
v.control,
|
||||||
|
'clicked',
|
||||||
|
() => {
|
||||||
|
this._needsIconAllocate = currentAppsView != v;
|
||||||
|
currentAppsView = v;
|
||||||
|
}
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
this._signalsHandler.add(
|
this._signalsHandler.add(
|
||||||
[
|
|
||||||
v.control,
|
|
||||||
'clicked',
|
|
||||||
() => {
|
|
||||||
this._needsIconAllocate = currentAppsView != v;
|
|
||||||
currentAppsView = v;
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
v.view,
|
v.view,
|
||||||
'notify::visible',
|
'notify::visible',
|
||||||
@@ -566,7 +571,7 @@ var dtpPanelManager = Utils.defineClass({
|
|||||||
this._syncWorkspacesFullGeometry();
|
this._syncWorkspacesFullGeometry();
|
||||||
if (this._actualGeometry)
|
if (this._actualGeometry)
|
||||||
this._syncWorkspacesActualGeometry();
|
this._syncWorkspacesActualGeometry();
|
||||||
} else {
|
} else if (this._updateWorkspacesFullGeometry) {
|
||||||
this._updateWorkspacesFullGeometry();
|
this._updateWorkspacesFullGeometry();
|
||||||
this._updateWorkspacesActualGeometry();
|
this._updateWorkspacesActualGeometry();
|
||||||
}
|
}
|
||||||
@@ -582,7 +587,7 @@ var dtpPanelManager = Utils.defineClass({
|
|||||||
if (this.child == null)
|
if (this.child == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.set_allocation(box, flags);
|
Utils.setAllocation(this, box, flags);
|
||||||
|
|
||||||
let availWidth = box.x2 - box.x1;
|
let availWidth = box.x2 - box.x1;
|
||||||
let availHeight = box.y2 - box.y1;
|
let availHeight = box.y2 - box.y1;
|
||||||
@@ -598,7 +603,7 @@ var dtpPanelManager = Utils.defineClass({
|
|||||||
childBox.x2 = childBox.x1 + childWidth;
|
childBox.x2 = childBox.x1 + childWidth;
|
||||||
childBox.y2 = childBox.y1 + childHeight;
|
childBox.y2 = childBox.y1 + childHeight;
|
||||||
|
|
||||||
this.child.allocate(childBox, flags);
|
Utils.allocate(this.child, childBox, flags);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -665,7 +670,7 @@ function newDoSpringAnimation(animationDirection) {
|
|||||||
|
|
||||||
function newAnimateIconPosition(icon, box, flags, nChangedIcons) {
|
function newAnimateIconPosition(icon, box, flags, nChangedIcons) {
|
||||||
if (this._needsIconAllocate) {
|
if (this._needsIconAllocate) {
|
||||||
icon.allocate(box, flags);
|
Utils.allocate(icon, box, flags);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
45
prefs.js
45
prefs.js
@@ -988,6 +988,24 @@ const Settings = new Lang.Class({
|
|||||||
dialog.show_all();
|
dialog.show_all();
|
||||||
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
this._settings.bind('desktop-line-use-custom-color',
|
||||||
|
this._builder.get_object('override_show_desktop_line_color_switch'),
|
||||||
|
'active',
|
||||||
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
|
||||||
|
this._settings.bind('desktop-line-use-custom-color',
|
||||||
|
this._builder.get_object('override_show_desktop_line_color_colorbutton'),
|
||||||
|
'sensitive',
|
||||||
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
|
||||||
|
rgba.parse(this._settings.get_string('desktop-line-custom-color'));
|
||||||
|
this._builder.get_object('override_show_desktop_line_color_colorbutton').set_rgba(rgba);
|
||||||
|
this._builder.get_object('override_show_desktop_line_color_colorbutton').connect('notify::color', Lang.bind(this, function (button) {
|
||||||
|
let rgba = button.get_rgba();
|
||||||
|
let css = rgba.to_string();
|
||||||
|
this._settings.set_string('desktop-line-custom-color', css);
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
this._settings.bind('intellihide',
|
this._settings.bind('intellihide',
|
||||||
@@ -1247,6 +1265,14 @@ const Settings = new Lang.Class({
|
|||||||
this._builder.get_object('preview_custom_opacity_spinbutton'),
|
this._builder.get_object('preview_custom_opacity_spinbutton'),
|
||||||
'sensitive',
|
'sensitive',
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
this._settings.bind('window-preview-use-custom-icon-size',
|
||||||
|
this._builder.get_object('preview_custom_icon_size_switch'),
|
||||||
|
'active',
|
||||||
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
this._settings.bind('window-preview-use-custom-icon-size',
|
||||||
|
this._builder.get_object('preview_custom_icon_size_spinbutton'),
|
||||||
|
'sensitive',
|
||||||
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
|
||||||
this._builder.get_object('preview_custom_opacity_spinbutton').set_value(this._settings.get_int('preview-custom-opacity'));
|
this._builder.get_object('preview_custom_opacity_spinbutton').set_value(this._settings.get_int('preview-custom-opacity'));
|
||||||
this._builder.get_object('preview_custom_opacity_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
this._builder.get_object('preview_custom_opacity_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
||||||
@@ -1270,6 +1296,10 @@ const Settings = new Lang.Class({
|
|||||||
this._builder.get_object('preview_show_title_switch'),
|
this._builder.get_object('preview_show_title_switch'),
|
||||||
'active',
|
'active',
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
this._settings.bind('window-preview-show-title',
|
||||||
|
this._builder.get_object('grid_preview_custom_icon_size'),
|
||||||
|
'sensitive',
|
||||||
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
this._settings.bind('window-preview-show-title',
|
this._settings.bind('window-preview-show-title',
|
||||||
this._builder.get_object('grid_preview_title_size'),
|
this._builder.get_object('grid_preview_title_size'),
|
||||||
'sensitive',
|
'sensitive',
|
||||||
@@ -1332,6 +1362,11 @@ const Settings = new Lang.Class({
|
|||||||
this._builder.get_object('preview_title_size_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
this._builder.get_object('preview_title_size_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
||||||
this._settings.set_int('window-preview-title-font-size', widget.get_value());
|
this._settings.set_int('window-preview-title-font-size', widget.get_value());
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
this._builder.get_object('preview_custom_icon_size_spinbutton').set_value(this._settings.get_int('window-preview-custom-icon-size'));
|
||||||
|
this._builder.get_object('preview_custom_icon_size_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
||||||
|
this._settings.set_int('window-preview-custom-icon-size', widget.get_value());
|
||||||
|
}));
|
||||||
|
|
||||||
this._builder.get_object('grid_preview_title_weight_combo').set_active_id(this._settings.get_string('window-preview-title-font-weight'));
|
this._builder.get_object('grid_preview_title_weight_combo').set_active_id(this._settings.get_string('window-preview-title-font-weight'));
|
||||||
this._builder.get_object('grid_preview_title_weight_combo').connect('changed', Lang.bind (this, function(widget) {
|
this._builder.get_object('grid_preview_title_weight_combo').connect('changed', Lang.bind (this, function(widget) {
|
||||||
@@ -1359,6 +1394,8 @@ const Settings = new Lang.Class({
|
|||||||
this._builder.get_object('animation_time_spinbutton').set_value(this._settings.get_int('window-preview-animation-time'));
|
this._builder.get_object('animation_time_spinbutton').set_value(this._settings.get_int('window-preview-animation-time'));
|
||||||
|
|
||||||
this._settings.set_value('preview-use-custom-opacity', this._settings.get_default_value('preview-use-custom-opacity'));
|
this._settings.set_value('preview-use-custom-opacity', this._settings.get_default_value('preview-use-custom-opacity'));
|
||||||
|
|
||||||
|
this._settings.set_value('window-preview-use-custom-icon-size', this._settings.get_default_value('window-preview-use-custom-icon-size'));
|
||||||
|
|
||||||
this._settings.set_value('preview-custom-opacity', this._settings.get_default_value('preview-custom-opacity'));
|
this._settings.set_value('preview-custom-opacity', this._settings.get_default_value('preview-custom-opacity'));
|
||||||
this._builder.get_object('preview_custom_opacity_spinbutton').set_value(this._settings.get_int('preview-custom-opacity'));
|
this._builder.get_object('preview_custom_opacity_spinbutton').set_value(this._settings.get_int('preview-custom-opacity'));
|
||||||
@@ -1392,6 +1429,9 @@ const Settings = new Lang.Class({
|
|||||||
|
|
||||||
this._settings.set_value('window-preview-title-font-size', this._settings.get_default_value('window-preview-title-font-size'));
|
this._settings.set_value('window-preview-title-font-size', this._settings.get_default_value('window-preview-title-font-size'));
|
||||||
this._builder.get_object('preview_title_size_spinbutton').set_value(this._settings.get_int('window-preview-title-font-size'));
|
this._builder.get_object('preview_title_size_spinbutton').set_value(this._settings.get_int('window-preview-title-font-size'));
|
||||||
|
|
||||||
|
this._settings.set_value('window-preview-custom-icon-size', this._settings.get_default_value('window-preview-custom-icon-size'));
|
||||||
|
this._builder.get_object('preview_custom_icon_size_spinbutton').set_value(this._settings.get_int('window-preview-custom-icon-size'));
|
||||||
|
|
||||||
this._settings.set_value('window-preview-title-font-weight', this._settings.get_default_value('window-preview-title-font-weight'));
|
this._settings.set_value('window-preview-title-font-weight', this._settings.get_default_value('window-preview-title-font-weight'));
|
||||||
this._builder.get_object('grid_preview_title_weight_combo').set_active_id(this._settings.get_string('window-preview-title-font-weight'));
|
this._builder.get_object('grid_preview_title_weight_combo').set_active_id(this._settings.get_string('window-preview-title-font-weight'));
|
||||||
@@ -1423,6 +1463,11 @@ const Settings = new Lang.Class({
|
|||||||
'active',
|
'active',
|
||||||
Gio.SettingsBindFlags.DEFAULT);
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
|
||||||
|
this._settings.bind('overview-click-to-exit',
|
||||||
|
this._builder.get_object('clicktoexit_switch'),
|
||||||
|
'active',
|
||||||
|
Gio.SettingsBindFlags.DEFAULT);
|
||||||
|
|
||||||
this._settings.bind('group-apps',
|
this._settings.bind('group-apps',
|
||||||
this._builder.get_object('group_apps_switch'),
|
this._builder.get_object('group_apps_switch'),
|
||||||
'active',
|
'active',
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ var ProgressIndicator = Utils.defineClass({
|
|||||||
this._notificationBadgeBin.hide();
|
this._notificationBadgeBin.hide();
|
||||||
|
|
||||||
this._source._dtpIconContainer.add_child(this._notificationBadgeBin);
|
this._source._dtpIconContainer.add_child(this._notificationBadgeBin);
|
||||||
this._source._dtpIconContainer.connect('allocation-changed', this.updateNotificationBadge.bind(this));
|
this._source._dtpIconContainer.connect('notify::allocation', this.updateNotificationBadge.bind(this));
|
||||||
|
|
||||||
this._progressManagerEntries = [];
|
this._progressManagerEntries = [];
|
||||||
this._progressManager.lookupById(this._source.app.id).forEach(
|
this._progressManager.lookupById(this._source.app.id).forEach(
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ var ProximityWatch = Utils.defineClass({
|
|||||||
this.threshold = [xThreshold, yThreshold];
|
this.threshold = [xThreshold, yThreshold];
|
||||||
this.handler = handler;
|
this.handler = handler;
|
||||||
|
|
||||||
this._allocationChangedId = actor.connect('allocation-changed', () => this._update());
|
this._allocationChangedId = actor.connect('notify::allocation', () => this._update());
|
||||||
|
|
||||||
this._update();
|
this._update();
|
||||||
},
|
},
|
||||||
@@ -155,7 +155,7 @@ var ProximityManager = Utils.defineClass({
|
|||||||
let focusedWindowInfo = this._getFocusedWindowInfo(focusedWindow);
|
let focusedWindowInfo = this._getFocusedWindowInfo(focusedWindow);
|
||||||
|
|
||||||
if (focusedWindowInfo && this._checkIfHandledWindowType(focusedWindowInfo.metaWindow)) {
|
if (focusedWindowInfo && this._checkIfHandledWindowType(focusedWindowInfo.metaWindow)) {
|
||||||
focusedWindowInfo.allocationId = focusedWindowInfo.window.connect('allocation-changed', () => this._queueUpdate());
|
focusedWindowInfo.allocationId = focusedWindowInfo.window.connect('notify::allocation', () => this._queueUpdate());
|
||||||
focusedWindowInfo.destroyId = focusedWindowInfo.window.connect('destroy', () => this._disconnectFocusedWindow(true));
|
focusedWindowInfo.destroyId = focusedWindowInfo.window.connect('destroy', () => this._disconnectFocusedWindow(true));
|
||||||
|
|
||||||
this._focusedWindowInfo = focusedWindowInfo;
|
this._focusedWindowInfo = focusedWindowInfo;
|
||||||
|
|||||||
@@ -107,6 +107,16 @@
|
|||||||
<summary>Panel size</summary>
|
<summary>Panel size</summary>
|
||||||
<description>Set the size of the panel.</description>
|
<description>Set the size of the panel.</description>
|
||||||
</key>
|
</key>
|
||||||
|
<key type="b" name="desktop-line-use-custom-color">
|
||||||
|
<default>false</default>
|
||||||
|
<summary>Override Show Desktop line color</summary>
|
||||||
|
<description>Replace current Show Desktop button line color</description>
|
||||||
|
</key>
|
||||||
|
<key type="s" name="desktop-line-custom-color">
|
||||||
|
<default>"rgba(200,200,200,0.2)"</default>
|
||||||
|
<summary>Custom Show Desktop line color</summary>
|
||||||
|
<description>Custom Show Desktop button line color</description>
|
||||||
|
</key>
|
||||||
<key name="dot-position" enum="org.gnome.shell.extensions.dash-to-panel.position">
|
<key name="dot-position" enum="org.gnome.shell.extensions.dash-to-panel.position">
|
||||||
<default>'BOTTOM'</default>
|
<default>'BOTTOM'</default>
|
||||||
<summary>Dot position</summary>
|
<summary>Dot position</summary>
|
||||||
@@ -362,11 +372,6 @@
|
|||||||
<summary>Intellihide enable start delay</summary>
|
<summary>Intellihide enable start delay</summary>
|
||||||
<description>The delay before enabling intellihide on start</description>
|
<description>The delay before enabling intellihide on start</description>
|
||||||
</key>
|
</key>
|
||||||
<key type="b" name="show-show-apps-button">
|
|
||||||
<default>true</default>
|
|
||||||
<summary>Show applications button</summary>
|
|
||||||
<description>Show appplications button in the dash</description>
|
|
||||||
</key>
|
|
||||||
<key type="s" name="show-apps-icon-file">
|
<key type="s" name="show-apps-icon-file">
|
||||||
<default>""</default>
|
<default>""</default>
|
||||||
<summary>Custom Show Applications icon</summary>
|
<summary>Custom Show Applications icon</summary>
|
||||||
@@ -492,6 +497,16 @@
|
|||||||
<summary>Window previews title font size</summary>
|
<summary>Window previews title font size</summary>
|
||||||
<description>This defines the window preview titles font size.</description>
|
<description>This defines the window preview titles font size.</description>
|
||||||
</key>
|
</key>
|
||||||
|
<key type="b" name="window-preview-use-custom-icon-size">
|
||||||
|
<default>false</default>
|
||||||
|
<summary>Window previews use custom icon size</summary>
|
||||||
|
<description>Window previews use custom application icon size.</description>
|
||||||
|
</key>
|
||||||
|
<key type="i" name="window-preview-custom-icon-size">
|
||||||
|
<default>16</default>
|
||||||
|
<summary>Window previews custom icon size</summary>
|
||||||
|
<description>Window previews custom application icon size.</description>
|
||||||
|
</key>
|
||||||
<key type="i" name="window-preview-animation-time">
|
<key type="i" name="window-preview-animation-time">
|
||||||
<default>260</default>
|
<default>260</default>
|
||||||
<summary>Window previews animation time</summary>
|
<summary>Window previews animation time</summary>
|
||||||
@@ -541,6 +556,11 @@
|
|||||||
<default>false</default>
|
<default>false</default>
|
||||||
<summary>Provide workspace isolation</summary>
|
<summary>Provide workspace isolation</summary>
|
||||||
<description>Dash shows only windows from the current workspace</description>
|
<description>Dash shows only windows from the current workspace</description>
|
||||||
|
</key>
|
||||||
|
<key type="b" name="overview-click-to-exit">
|
||||||
|
<default>false</default>
|
||||||
|
<summary>Close overview by clicking in empty space</summary>
|
||||||
|
<description>Close overview or app grid by clicking in empty space</description>
|
||||||
</key>
|
</key>
|
||||||
<key type="b" name="group-apps">
|
<key type="b" name="group-apps">
|
||||||
<default>true</default>
|
<default>true</default>
|
||||||
|
|||||||
47
taskbar.js
47
taskbar.js
@@ -85,7 +85,7 @@ var taskbarActor = Utils.defineClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
vfunc_allocate: function(box, flags) {
|
vfunc_allocate: function(box, flags) {
|
||||||
this.set_allocation(box, flags);
|
Utils.setAllocation(this, box, flags);
|
||||||
|
|
||||||
let panel = this._delegate.dtpPanel;
|
let panel = this._delegate.dtpPanel;
|
||||||
let availFixedSize = box[panel.fixedCoord.c2] - box[panel.fixedCoord.c1];
|
let availFixedSize = box[panel.fixedCoord.c2] - box[panel.fixedCoord.c1];
|
||||||
@@ -100,7 +100,7 @@ var taskbarActor = Utils.defineClass({
|
|||||||
childBox[panel.fixedCoord.c1] = box[panel.fixedCoord.c1];
|
childBox[panel.fixedCoord.c1] = box[panel.fixedCoord.c1];
|
||||||
childBox[panel.fixedCoord.c2] = box[panel.fixedCoord.c2];
|
childBox[panel.fixedCoord.c2] = box[panel.fixedCoord.c2];
|
||||||
|
|
||||||
scrollview.allocate(childBox, flags);
|
Utils.allocate(scrollview, childBox, flags);
|
||||||
|
|
||||||
let [value, , upper, , , pageSize] = scrollview[orientation[0] + 'scroll'].adjustment.get_values();
|
let [value, , upper, , , pageSize] = scrollview[orientation[0] + 'scroll'].adjustment.get_values();
|
||||||
upper = Math.floor(upper);
|
upper = Math.floor(upper);
|
||||||
@@ -116,11 +116,11 @@ var taskbarActor = Utils.defineClass({
|
|||||||
}
|
}
|
||||||
|
|
||||||
childBox[panel.varCoord.c2] = childBox[panel.varCoord.c1] + (value > 0 ? scrollview._dtpFadeSize : 0);
|
childBox[panel.varCoord.c2] = childBox[panel.varCoord.c1] + (value > 0 ? scrollview._dtpFadeSize : 0);
|
||||||
leftFade.allocate(childBox, flags);
|
Utils.allocate(leftFade, childBox, flags);
|
||||||
|
|
||||||
childBox[panel.varCoord.c1] = box[panel.varCoord.c2] - (value + pageSize < upper ? scrollview._dtpFadeSize : 0);
|
childBox[panel.varCoord.c1] = box[panel.varCoord.c2] - (value + pageSize < upper ? scrollview._dtpFadeSize : 0);
|
||||||
childBox[panel.varCoord.c2] = box[panel.varCoord.c2];
|
childBox[panel.varCoord.c2] = box[panel.varCoord.c2];
|
||||||
rightFade.allocate(childBox, flags);
|
Utils.allocate(rightFade, childBox, flags);
|
||||||
},
|
},
|
||||||
|
|
||||||
// We want to request the natural size of all our children
|
// We want to request the natural size of all our children
|
||||||
@@ -228,9 +228,6 @@ var taskbar = Utils.defineClass({
|
|||||||
this.previewMenu = new WindowPreview.PreviewMenu(panel);
|
this.previewMenu = new WindowPreview.PreviewMenu(panel);
|
||||||
this.previewMenu.enable();
|
this.previewMenu.enable();
|
||||||
|
|
||||||
if (!Me.settings.get_boolean('show-show-apps-button'))
|
|
||||||
this.hideShowAppsButton();
|
|
||||||
|
|
||||||
let rtl = Clutter.get_default_text_direction() == Clutter.TextDirection.RTL;
|
let rtl = Clutter.get_default_text_direction() == Clutter.TextDirection.RTL;
|
||||||
this.actor = new St.Bin({ child: this._container,
|
this.actor = new St.Bin({ child: this._container,
|
||||||
y_align: St.Align.START, x_align:rtl?St.Align.END:St.Align.START
|
y_align: St.Align.START, x_align:rtl?St.Align.END:St.Align.START
|
||||||
@@ -311,18 +308,6 @@ var taskbar = Utils.defineClass({
|
|||||||
'notify::checked',
|
'notify::checked',
|
||||||
Lang.bind(this, this._syncShowAppsButtonToggled)
|
Lang.bind(this, this._syncShowAppsButtonToggled)
|
||||||
],
|
],
|
||||||
[
|
|
||||||
Me.settings,
|
|
||||||
'changed::show-show-apps-button',
|
|
||||||
Lang.bind(this, function() {
|
|
||||||
if (Me.settings.get_boolean('show-show-apps-button'))
|
|
||||||
this.showShowAppsButton();
|
|
||||||
else
|
|
||||||
this.hideShowAppsButton();
|
|
||||||
|
|
||||||
this.resetAppIcons();
|
|
||||||
})
|
|
||||||
],
|
|
||||||
[
|
[
|
||||||
Me.settings,
|
Me.settings,
|
||||||
[
|
[
|
||||||
@@ -963,20 +948,18 @@ var taskbar = Utils.defineClass({
|
|||||||
return DND.DragMotionResult.NO_DROP;
|
return DND.DragMotionResult.NO_DROP;
|
||||||
|
|
||||||
let sourceActor = source instanceof St.Widget ? source : source.actor;
|
let sourceActor = source instanceof St.Widget ? source : source.actor;
|
||||||
|
let isVertical = this.dtpPanel.checkIfVertical();
|
||||||
|
|
||||||
if (!this._box.contains(sourceActor) && !source._dashItemContainer) {
|
if (!this._box.contains(sourceActor) && !source._dashItemContainer) {
|
||||||
//not an appIcon of the taskbar, probably from the applications view
|
//not an appIcon of the taskbar, probably from the applications view
|
||||||
source._dashItemContainer = new DragPlaceholderItem(source, this.iconSize);
|
source._dashItemContainer = new DragPlaceholderItem(source, this.iconSize, isVertical);
|
||||||
this._box.insert_child_above(source._dashItemContainer, null);
|
this._box.insert_child_above(source._dashItemContainer, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
let isVertical = this.dtpPanel.checkIfVertical();
|
|
||||||
let sizeProp = isVertical ? 'height' : 'width';
|
let sizeProp = isVertical ? 'height' : 'width';
|
||||||
let posProp = isVertical ? 'y' : 'x';
|
let posProp = isVertical ? 'y' : 'x';
|
||||||
let pos = isVertical ? y : x;
|
let pos = isVertical ? y : x;
|
||||||
|
|
||||||
pos -= this.showAppsButton[sizeProp];
|
|
||||||
|
|
||||||
let currentAppIcons = this._getAppIcons();
|
let currentAppIcons = this._getAppIcons();
|
||||||
let sourceIndex = currentAppIcons.indexOf(source);
|
let sourceIndex = currentAppIcons.indexOf(source);
|
||||||
let hoveredIndex = Utils.findIndex(currentAppIcons,
|
let hoveredIndex = Utils.findIndex(currentAppIcons,
|
||||||
@@ -1098,7 +1081,7 @@ var taskbar = Utils.defineClass({
|
|||||||
if (selector._showAppsButton.checked !== this.showAppsButton.checked) {
|
if (selector._showAppsButton.checked !== this.showAppsButton.checked) {
|
||||||
// find visible view
|
// find visible view
|
||||||
let visibleView;
|
let visibleView;
|
||||||
Main.overview.viewSelector.appDisplay._views.every(function(v, index) {
|
Utils.getAppDisplayViews().every(function(v, index) {
|
||||||
if (v.view.actor.visible) {
|
if (v.view.actor.visible) {
|
||||||
visibleView = index;
|
visibleView = index;
|
||||||
return false;
|
return false;
|
||||||
@@ -1125,7 +1108,7 @@ var taskbar = Utils.defineClass({
|
|||||||
// runs if we are already inside the overview.
|
// runs if we are already inside the overview.
|
||||||
if (!Main.overview._shown) {
|
if (!Main.overview._shown) {
|
||||||
this.forcedOverview = true;
|
this.forcedOverview = true;
|
||||||
let grid = Main.overview.viewSelector.appDisplay._views[visibleView].view._grid;
|
let grid = Utils.getAppDisplayViews()[visibleView].view._grid;
|
||||||
let onShownCb;
|
let onShownCb;
|
||||||
let overviewShownId = Main.overview.connect('shown', () => {
|
let overviewShownId = Main.overview.connect('shown', () => {
|
||||||
Main.overview.disconnect(overviewShownId);
|
Main.overview.disconnect(overviewShownId);
|
||||||
@@ -1179,7 +1162,7 @@ var taskbar = Utils.defineClass({
|
|||||||
// Manually trigger springout animation without activating the
|
// Manually trigger springout animation without activating the
|
||||||
// workspaceView to avoid the zoomout animation. Hide the appPage
|
// workspaceView to avoid the zoomout animation. Hide the appPage
|
||||||
// onComplete to avoid ugly flashing of original icons.
|
// onComplete to avoid ugly flashing of original icons.
|
||||||
let view = Main.overview.viewSelector.appDisplay._views[visibleView].view;
|
let view = Utils.getAppDisplayViews()[visibleView].view;
|
||||||
view.animate(IconGrid.AnimationDirection.OUT, Lang.bind(this, function() {
|
view.animate(IconGrid.AnimationDirection.OUT, Lang.bind(this, function() {
|
||||||
Main.overview.viewSelector._appsPage.hide();
|
Main.overview.viewSelector._appsPage.hide();
|
||||||
Main.overview.hide();
|
Main.overview.hide();
|
||||||
@@ -1212,12 +1195,6 @@ var taskbar = Utils.defineClass({
|
|||||||
this.showAppsButton.set_height(-1);
|
this.showAppsButton.set_height(-1);
|
||||||
},
|
},
|
||||||
|
|
||||||
hideShowAppsButton: function() {
|
|
||||||
this.showAppsButton.hide();
|
|
||||||
this.showAppsButton.set_width(0);
|
|
||||||
this.showAppsButton.set_height(0);
|
|
||||||
},
|
|
||||||
|
|
||||||
popupFocusedAppSecondaryMenu: function() {
|
popupFocusedAppSecondaryMenu: function() {
|
||||||
let appIcons = this._getAppIcons();
|
let appIcons = this._getAppIcons();
|
||||||
let tracker = Shell.WindowTracker.get_default();
|
let tracker = Shell.WindowTracker.get_default();
|
||||||
@@ -1243,8 +1220,8 @@ var DragPlaceholderItem = Utils.defineClass({
|
|||||||
Name: 'DashToPanel-DragPlaceholderItem',
|
Name: 'DashToPanel-DragPlaceholderItem',
|
||||||
Extends: St.Widget,
|
Extends: St.Widget,
|
||||||
|
|
||||||
_init: function(appIcon, iconSize) {
|
_init: function(appIcon, iconSize, isVertical) {
|
||||||
this.callParent('_init', { style: appIcon.getIconContainerStyle(), layout_manager: new Clutter.BinLayout() });
|
this.callParent('_init', { style: AppIcons.getIconContainerStyle(isVertical), layout_manager: new Clutter.BinLayout() });
|
||||||
|
|
||||||
this.child = { _delegate: appIcon };
|
this.child = { _delegate: appIcon };
|
||||||
|
|
||||||
|
|||||||
54
utils.js
54
utils.js
@@ -302,6 +302,11 @@ var getScaleFactor = function() {
|
|||||||
return getStageTheme().scale_factor || 1;
|
return getStageTheme().scale_factor || 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var getAppDisplayViews = function() {
|
||||||
|
//gnome-shell 3.38 only has one view and it is now the appDisplay
|
||||||
|
return Main.overview.viewSelector.appDisplay._views || [{ view: Main.overview.viewSelector.appDisplay }];
|
||||||
|
};
|
||||||
|
|
||||||
var findIndex = function(array, predicate) {
|
var findIndex = function(array, predicate) {
|
||||||
if (Array.prototype.findIndex) {
|
if (Array.prototype.findIndex) {
|
||||||
return array.findIndex(predicate);
|
return array.findIndex(predicate);
|
||||||
@@ -353,6 +358,38 @@ var wrapActor = function(actor) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var getTransformedAllocation = function(actor) {
|
||||||
|
if (Config.PACKAGE_VERSION < '3.37') {
|
||||||
|
return Shell.util_get_transformed_allocation(actor);
|
||||||
|
}
|
||||||
|
|
||||||
|
let extents = actor.get_transformed_extents();
|
||||||
|
let topLeft = extents.get_top_left();
|
||||||
|
let bottomRight = extents.get_bottom_right();
|
||||||
|
|
||||||
|
return { x1: topLeft.x, x2: bottomRight.x, y1: topLeft.y, y2: bottomRight.y };
|
||||||
|
};
|
||||||
|
|
||||||
|
var allocate = function(actor, box, flags, useParent) {
|
||||||
|
let allocateObj = useParent ? actor.__proto__ : actor;
|
||||||
|
|
||||||
|
allocateObj.allocate.apply(actor, getAllocationParams(box, flags));
|
||||||
|
};
|
||||||
|
|
||||||
|
var setAllocation = function(actor, box, flags) {
|
||||||
|
actor.set_allocation.apply(actor, getAllocationParams(box, flags));
|
||||||
|
};
|
||||||
|
|
||||||
|
var getAllocationParams = function(box, flags) {
|
||||||
|
let params = [box];
|
||||||
|
|
||||||
|
if (Config.PACKAGE_VERSION < '3.37') {
|
||||||
|
params.push(flags);
|
||||||
|
}
|
||||||
|
|
||||||
|
return params;
|
||||||
|
};
|
||||||
|
|
||||||
var setClip = function(actor, x, y, width, height) {
|
var setClip = function(actor, x, y, width, height) {
|
||||||
actor.set_clip(0, 0, width, height);
|
actor.set_clip(0, 0, width, height);
|
||||||
actor.set_position(x, y);
|
actor.set_position(x, y);
|
||||||
@@ -377,14 +414,18 @@ var removeKeybinding = function(key) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var getrgbColor = function(color) {
|
||||||
|
color = typeof color === 'string' ? Clutter.color_from_string(color)[1] : color;
|
||||||
|
|
||||||
|
return { red: color.red, green: color.green, blue: color.blue };
|
||||||
|
};
|
||||||
|
|
||||||
var getrgbaColor = function(color, alpha, offset) {
|
var getrgbaColor = function(color, alpha, offset) {
|
||||||
if (alpha <= 0) {
|
if (alpha <= 0) {
|
||||||
return 'transparent; ';
|
return 'transparent; ';
|
||||||
}
|
}
|
||||||
|
|
||||||
color = typeof color === 'string' ? Clutter.color_from_string(color)[1] : color;
|
let rgb = getrgbColor(color);
|
||||||
|
|
||||||
let rgb = { red: color.red, green: color.green, blue: color.blue };
|
|
||||||
|
|
||||||
if (offset) {
|
if (offset) {
|
||||||
['red', 'green', 'blue'].forEach(k => {
|
['red', 'green', 'blue'].forEach(k => {
|
||||||
@@ -399,6 +440,13 @@ var getrgbaColor = function(color, alpha, offset) {
|
|||||||
return 'rgba(' + rgb.red + ',' + rgb.green + ',' + rgb.blue + ',' + (Math.floor(alpha * 100) * 0.01) + '); ' ;
|
return 'rgba(' + rgb.red + ',' + rgb.green + ',' + rgb.blue + ',' + (Math.floor(alpha * 100) * 0.01) + '); ' ;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var checkIfColorIsBright = function(color) {
|
||||||
|
let rgb = getrgbColor(color);
|
||||||
|
let brightness = 0.2126 * rgb.red + 0.7152 * rgb.green + 0.0722 * rgb.blue;
|
||||||
|
|
||||||
|
return brightness > 128;
|
||||||
|
};
|
||||||
|
|
||||||
var getMouseScrollDirection = function(event) {
|
var getMouseScrollDirection = function(event) {
|
||||||
let direction;
|
let direction;
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ const Mainloop = imports.mainloop;
|
|||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const PopupMenu = imports.ui.popupMenu;
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
const Signals = imports.signals;
|
const Signals = imports.signals;
|
||||||
const Shell = imports.gi.Shell;
|
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
const WindowManager = imports.ui.windowManager;
|
const WindowManager = imports.ui.windowManager;
|
||||||
const Workspace = imports.ui.workspace;
|
const Workspace = imports.ui.workspace;
|
||||||
@@ -464,7 +463,7 @@ var PreviewMenu = Utils.defineClass({
|
|||||||
_updatePosition: function() {
|
_updatePosition: function() {
|
||||||
let sourceNode = this.currentAppIcon.actor.get_theme_node();
|
let sourceNode = this.currentAppIcon.actor.get_theme_node();
|
||||||
let sourceContentBox = sourceNode.get_content_box(this.currentAppIcon.actor.get_allocation_box());
|
let sourceContentBox = sourceNode.get_content_box(this.currentAppIcon.actor.get_allocation_box());
|
||||||
let sourceAllocation = Shell.util_get_transformed_allocation(this.currentAppIcon.actor);
|
let sourceAllocation = Utils.getTransformedAllocation(this.currentAppIcon.actor);
|
||||||
let [previewsWidth, previewsHeight] = this._getPreviewsSize();
|
let [previewsWidth, previewsHeight] = this._getPreviewsSize();
|
||||||
let appIconMargin = Me.settings.get_int('appicon-margin') / scaleFactor;
|
let appIconMargin = Me.settings.get_int('appicon-margin') / scaleFactor;
|
||||||
let x = 0, y = 0;
|
let x = 0, y = 0;
|
||||||
@@ -706,7 +705,7 @@ var Preview = Utils.defineClass({
|
|||||||
this._previewDimensions = this._getPreviewDimensions();
|
this._previewDimensions = this._getPreviewDimensions();
|
||||||
this.animatingOut = false;
|
this.animatingOut = false;
|
||||||
|
|
||||||
let box = new St.Widget({ layout_manager: new Clutter.BoxLayout({ vertical: true }), y_expand: true });
|
let box = new St.Widget({ layout_manager: new Clutter.BoxLayout({ orientation: Clutter.Orientation.VERTICAL }), y_expand: true });
|
||||||
let [previewBinWidth, previewBinHeight] = this._getBinSize();
|
let [previewBinWidth, previewBinHeight] = this._getBinSize();
|
||||||
let closeButton = new St.Button({ style_class: 'window-close', accessible_name: 'Close window' });
|
let closeButton = new St.Button({ style_class: 'window-close', accessible_name: 'Close window' });
|
||||||
|
|
||||||
@@ -875,13 +874,16 @@ var Preview = Utils.defineClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
_onCloseBtnClick: function() {
|
_onCloseBtnClick: function() {
|
||||||
this.window.delete(global.get_current_time());
|
|
||||||
this._hideOrShowCloseButton(true);
|
this._hideOrShowCloseButton(true);
|
||||||
this.reactive = false;
|
this.reactive = false;
|
||||||
|
|
||||||
if (!Me.settings.get_boolean('group-apps')) {
|
if (!Me.settings.get_boolean('group-apps')) {
|
||||||
this._previewMenu.close();
|
this._previewMenu.close();
|
||||||
|
} else {
|
||||||
|
this._previewMenu.endPeekHere();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.window.delete(global.get_current_time());
|
||||||
},
|
},
|
||||||
|
|
||||||
_onButtonReleaseEvent: function(e) {
|
_onButtonReleaseEvent: function(e) {
|
||||||
@@ -948,7 +950,9 @@ var Preview = Utils.defineClass({
|
|||||||
|
|
||||||
_updateHeader: function() {
|
_updateHeader: function() {
|
||||||
if (headerHeight) {
|
if (headerHeight) {
|
||||||
let iconTextureSize = headerHeight / scaleFactor * .6;
|
let iconTextureSize = Me.settings.get_boolean('window-preview-use-custom-icon-size') ?
|
||||||
|
Me.settings.get_int('window-preview-custom-icon-size') :
|
||||||
|
headerHeight / scaleFactor * .6;
|
||||||
let icon = this._previewMenu.getCurrentAppIcon().app.create_icon_texture(iconTextureSize);
|
let icon = this._previewMenu.getCurrentAppIcon().app.create_icon_texture(iconTextureSize);
|
||||||
let workspaceIndex = '';
|
let workspaceIndex = '';
|
||||||
let workspaceStyle = null;
|
let workspaceStyle = null;
|
||||||
@@ -1125,7 +1129,7 @@ var WindowCloneLayout = Utils.defineClass({
|
|||||||
height + (this.bufferRect.height - this.frameRect.height) * this.ratio
|
height + (this.bufferRect.height - this.frameRect.height) * this.ratio
|
||||||
);
|
);
|
||||||
|
|
||||||
actor.get_first_child().allocate(box, flags);
|
Utils.allocate(actor.get_first_child(), box, flags);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1142,4 +1146,4 @@ function getTweenOpts(opts) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return Utils.mergeObjects(opts || {}, defaults);
|
return Utils.mergeObjects(opts || {}, defaults);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user