mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Use default gnome-shell icon size in overview
This commit is contained in:
@@ -245,6 +245,10 @@ var taskbarAppIcon = Utils.defineClass({
|
||||
this._progressIndicator = new Progress.ProgressIndicator(this, panel.progressManager);
|
||||
},
|
||||
|
||||
getDragActor: function() {
|
||||
return this.app.create_icon_texture(this.dtpPanel.taskbar.iconSize);
|
||||
},
|
||||
|
||||
shouldShowTooltip: function() {
|
||||
if (!Me.settings.get_boolean('show-tooltip') ||
|
||||
(!this.isLauncher && Me.settings.get_boolean("show-window-previews") &&
|
||||
|
||||
@@ -69,9 +69,6 @@ var dtpOverview = Utils.defineClass({
|
||||
|
||||
this._toggleDash(true);
|
||||
|
||||
// reset stored icon size to the default dash
|
||||
Utils.setDashIconSize((Main.overview._overview._controls || Main.overview._controls).dash.iconSize);
|
||||
|
||||
// Remove key bindings
|
||||
this._disableHotKeys();
|
||||
this._disableExtraShortcut();
|
||||
|
||||
24
panel.js
24
panel.js
@@ -302,7 +302,6 @@ var dtpPanel = Utils.defineClass({
|
||||
this._timeoutsHandler.add([T1, 0, () => this.dynamicTransparency = new Transparency.DynamicTransparency(this)]);
|
||||
|
||||
this.taskbar = new Taskbar.taskbar(this);
|
||||
Utils.setDashIconSize(this.taskbar.iconSize);
|
||||
|
||||
this.container.insert_child_above(this.taskbar.actor, null);
|
||||
|
||||
@@ -332,32 +331,12 @@ var dtpPanel = Utils.defineClass({
|
||||
'changed',
|
||||
() => this._resetGeometry()
|
||||
],
|
||||
// Keep dragged icon consistent in size with this dash
|
||||
[
|
||||
this.taskbar,
|
||||
'icon-size-changed',
|
||||
Lang.bind(this, function() {
|
||||
Utils.setDashIconSize(this.taskbar.iconSize);
|
||||
})
|
||||
],
|
||||
[
|
||||
// sync hover after a popupmenu is closed
|
||||
this.taskbar,
|
||||
'menu-closed',
|
||||
Lang.bind(this, function(){this.container.sync_hover();})
|
||||
],
|
||||
// This duplicate the similar signal which is in overview.js.
|
||||
// Being connected and thus executed later this effectively
|
||||
// overwrite any attempt to use the size of the default dash
|
||||
// which given the customization is usually much smaller.
|
||||
// I can't easily disconnect the original signal
|
||||
[
|
||||
(Main.overview._overview._controls || Main.overview._controls).dash,
|
||||
'icon-size-changed',
|
||||
Lang.bind(this, function() {
|
||||
Utils.setDashIconSize(this.taskbar.iconSize);
|
||||
})
|
||||
],
|
||||
[
|
||||
Main.overview,
|
||||
[
|
||||
@@ -447,9 +426,6 @@ var dtpPanel = Utils.defineClass({
|
||||
|
||||
this.taskbar.destroy();
|
||||
|
||||
// reset stored icon size to the default dash
|
||||
Utils.setDashIconSize((Main.overview._overview._controls || Main.overview._controls).dash.iconSize);
|
||||
|
||||
this.menuManager._changeMenu = this.menuManager._oldChangeMenu;
|
||||
|
||||
this._myPanelGhost.get_parent().remove_actor(this._myPanelGhost);
|
||||
|
||||
@@ -716,7 +716,6 @@ var taskbar = Utils.defineClass({
|
||||
let scale = this.iconSize / availSize;
|
||||
|
||||
this.iconSize = availSize;
|
||||
this.emit('icon-size-changed');
|
||||
|
||||
for (let i = 0; i < iconChildren.length; i++) {
|
||||
let icon = iconChildren[i].child._delegate.icon;
|
||||
@@ -947,7 +946,9 @@ var taskbar = Utils.defineClass({
|
||||
if (!this._settings.is_writable('favorite-apps'))
|
||||
return DND.DragMotionResult.NO_DROP;
|
||||
|
||||
if (!this._box.contains(source.actor) && !source._dashItemContainer) {
|
||||
let sourceActor = source instanceof St.Widget ? source : source.actor;
|
||||
|
||||
if (!this._box.contains(sourceActor) && !source._dashItemContainer) {
|
||||
//not an appIcon of the taskbar, probably from the applications view
|
||||
source._dashItemContainer = new DragPlaceholderItem(source, this.iconSize);
|
||||
this._box.insert_child_above(source._dashItemContainer, null);
|
||||
|
||||
8
utils.js
8
utils.js
@@ -430,14 +430,6 @@ var animateWindowOpacity = function(window, tweenOpts) {
|
||||
}
|
||||
};
|
||||
|
||||
var setDashIconSize = function(size) {
|
||||
if ('dash' in Main.overview) {
|
||||
Main.overview.dash.iconSize = size;
|
||||
} else {
|
||||
Main.overview.dashIconSize = size;
|
||||
}
|
||||
};
|
||||
|
||||
var getIndicators = function(delegate) {
|
||||
if (delegate instanceof St.BoxLayout) {
|
||||
return delegate;
|
||||
|
||||
Reference in New Issue
Block a user