mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Merge branch 'master' into feature-multimon
This commit is contained in:
@@ -1429,6 +1429,7 @@ var ShowAppsIconWrapper = new Lang.Class({
|
||||
/* the variable equivalent to toggleButton has a different name in the appIcon class
|
||||
(actor): duplicate reference to easily reuse appIcon methods */
|
||||
this.actor = this.realShowAppsIcon.toggleButton;
|
||||
this.actor.name = 'show-apps-btn';
|
||||
|
||||
// Re-use appIcon methods
|
||||
this._removeMenuTimeout = AppDisplay.AppIcon.prototype._removeMenuTimeout;
|
||||
@@ -1475,6 +1476,13 @@ var ShowAppsIconWrapper = new Lang.Class({
|
||||
customIconPath = this._dtpSettings.get_string('show-apps-icon-file');
|
||||
this.realShowAppsIcon.icon._createIconTexture(this.realShowAppsIcon.icon.iconSize);
|
||||
});
|
||||
|
||||
this._dtpSettings.connect('changed::appicon-padding', () => this.setShowAppsPadding());
|
||||
this.setShowAppsPadding();
|
||||
},
|
||||
|
||||
setShowAppsPadding: function() {
|
||||
this.actor.set_style('padding:' + (this._dtpSettings.get_int('appicon-padding') + 2) + 'px;');
|
||||
},
|
||||
|
||||
popupMenu: function() {
|
||||
|
||||
25
panel.js
25
panel.js
@@ -31,6 +31,7 @@ const Me = imports.misc.extensionUtils.getCurrentExtension();
|
||||
const Clutter = imports.gi.Clutter;
|
||||
const Config = imports.misc.config;
|
||||
const Gtk = imports.gi.Gtk;
|
||||
const Gi = imports._gi;
|
||||
const Utils = Me.imports.utils;
|
||||
const Taskbar = Me.imports.taskbar;
|
||||
const PanelStyle = Me.imports.panelStyle;
|
||||
@@ -123,17 +124,26 @@ var dtpPanelWrapper = new Lang.Class({
|
||||
this.oldRightBoxAllocate(box, flags);
|
||||
});
|
||||
|
||||
this._panelConnectId = this.panel.actor.connect('allocate', Lang.bind(this, function(actor,box,flags){this._allocate(actor,box,flags);}));
|
||||
if (this.panel.vfunc_allocate) {
|
||||
this._panelConnectId = 0;
|
||||
this._oldAllocate = this.panel.__proto__.vfunc_allocate;
|
||||
this.panel.__proto__[Gi.hook_up_vfunc_symbol]('allocate', (box, flags) => {
|
||||
//panel inherits from St.Widget, invoke its parent allocation
|
||||
St.Widget.prototype.vfunc_allocate.call(this.panel, box, flags);
|
||||
this._allocate(null, box, flags);
|
||||
});
|
||||
} else {
|
||||
this._panelConnectId = this.panel.actor.connect('allocate', (actor,box,flags) => this._allocate(actor,box,flags));
|
||||
}
|
||||
|
||||
if(this.appMenu)
|
||||
this.panel._leftBox.remove_child(this.appMenu.container);
|
||||
|
||||
this.taskbar = new Taskbar.taskbar(this._dtpSettings, this);
|
||||
Main.overview.dashIconSize = this.taskbar.iconSize;
|
||||
|
||||
this.container.insert_child_at_index( this.taskbar.actor, 2 );
|
||||
|
||||
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._setAppmenuVisible(this._dtpSettings.get_boolean('show-appmenu'));
|
||||
this._setClockLocation(this._dtpSettings.get_string('location-clock'));
|
||||
@@ -265,7 +275,12 @@ var dtpPanelWrapper = new Lang.Class({
|
||||
if(this.appMenu)
|
||||
this.panel._leftBox.add_child(this.appMenu.container);
|
||||
this.taskbar.destroy();
|
||||
this.panel.actor.disconnect(this._panelConnectId);
|
||||
|
||||
if (this._panelConnectId) {
|
||||
this.panel.actor.disconnect(this._panelConnectId);
|
||||
} else if (this._oldAllocate) {
|
||||
this.panel.__proto__[Gi.hook_up_vfunc_symbol]('allocate', this._oldAllocate);
|
||||
}
|
||||
|
||||
if (this.startIntellihideId) {
|
||||
Mainloop.source_remove(this.startIntellihideId);
|
||||
|
||||
@@ -244,7 +244,7 @@ function newPopupOpen(animate) {
|
||||
}
|
||||
|
||||
this._boxPointer.setPosition(this.sourceActor, this._arrowAlignment);
|
||||
this._boxPointer.show(animate);
|
||||
(this._boxPointer.open || this._boxPointer.show).call(this._boxPointer, animate);
|
||||
|
||||
this.actor.raise_top();
|
||||
|
||||
|
||||
@@ -24,12 +24,18 @@
|
||||
#dashtopanelScrollview .app-well-app .overview-icon {
|
||||
border-radius: 0;
|
||||
border: none;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
#dashtopanelScrollview .app-well-app .overview-label {
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
#show-apps-btn, #show-apps-btn .overview-icon {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#dashtopanelScrollview .app-well-app:hover .overview-icon,
|
||||
#dashtopanelScrollview .app-well-app:focus .overview-icon {
|
||||
background: none;
|
||||
|
||||
12
taskbar.js
12
taskbar.js
@@ -628,12 +628,12 @@ var taskbar = new Lang.Class({
|
||||
});
|
||||
},
|
||||
|
||||
_getTaskbarIcons: function() {
|
||||
_getTaskbarIcons: function(includeAnimated) {
|
||||
return this._box.get_children().filter(function(actor) {
|
||||
return actor.child &&
|
||||
actor.child._delegate &&
|
||||
actor.child._delegate.icon &&
|
||||
!actor.animatingOut;
|
||||
(includeAnimated || !actor.animatingOut);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -887,12 +887,8 @@ var taskbar = new Lang.Class({
|
||||
|
||||
// Reset the displayed apps icon to mantain the correct order
|
||||
resetAppIcons : function() {
|
||||
|
||||
let children = this._box.get_children().filter(function(actor) {
|
||||
return actor.child &&
|
||||
actor.child._delegate &&
|
||||
actor.child._delegate.icon;
|
||||
});
|
||||
let children = this._getTaskbarIcons(true);
|
||||
|
||||
for (let i = 0; i < children.length; i++) {
|
||||
let item = children[i];
|
||||
item.destroy();
|
||||
|
||||
@@ -255,7 +255,7 @@ var thumbnailPreviewMenu = new Lang.Class({
|
||||
this._activeMenuItem.setActive(false);
|
||||
|
||||
if (this._boxPointer.actor.visible) {
|
||||
this._boxPointer.hide(animate, Lang.bind(this, function() {
|
||||
(this._boxPointer.close || this._boxPointer.hide).call(this._boxPointer, animate, Lang.bind(this, function() {
|
||||
this.emit('menu-closed', this);
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user