mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +09:00
apply patch from @darkblaze69
This commit is contained in:
18
appIcons.js
18
appIcons.js
@@ -146,7 +146,7 @@ export const TaskbarAppIcon = GObject.registerClass({
|
||||
this._dotsContainer = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||
this._dtpIconContainer = new St.Widget({ layout_manager: new Clutter.BinLayout(), style: getIconContainerStyle(panel.checkIfVertical()) });
|
||||
|
||||
this.remove_actor(this._iconContainer);
|
||||
this.remove_child(this._iconContainer);
|
||||
|
||||
this._dtpIconContainer.add_child(this._iconContainer);
|
||||
|
||||
@@ -407,7 +407,7 @@ export const TaskbarAppIcon = GObject.registerClass({
|
||||
// Workaround to prevent scaled icon from being ugly when it is animated on hover.
|
||||
// It increases the "resolution" of the icon without changing the icon size.
|
||||
this.icon.createIcon = (iconSize) => this.app.create_icon_texture(2 * iconSize);
|
||||
this._iconIconBinActorAddedId = this.icon._iconBin.connect('actor-added', () => {
|
||||
this._iconIconBinActorAddedId = this.icon._iconBin.connect('child-added', () => {
|
||||
let size = this.icon.iconSize * Utils.getScaleFactor()
|
||||
|
||||
if (this.icon._iconBin.child.mapped) {
|
||||
@@ -649,7 +649,7 @@ export const TaskbarAppIcon = GObject.registerClass({
|
||||
// We want to keep the item hovered while the menu is up
|
||||
this._menu.blockSourceEvents = true;
|
||||
|
||||
Main.uiGroup.add_actor(this._menu.actor);
|
||||
Main.uiGroup.add_child(this._menu.actor);
|
||||
this._menuManager.addMenu(this._menu);
|
||||
}
|
||||
this._menu.updateQuitText();
|
||||
@@ -1107,7 +1107,7 @@ export const TaskbarAppIcon = GObject.registerClass({
|
||||
if (type == DOT_STYLE.SOLID || type == DOT_STYLE.METRO) {
|
||||
if (type == DOT_STYLE.SOLID || n <= 1) {
|
||||
cr.translate(startX, startY);
|
||||
Clutter.cairo_set_source_color(cr, bodyColor);
|
||||
cr.setSourceColor(bodyColor);
|
||||
cr.newSubPath();
|
||||
cr.rectangle.apply(cr, [0, 0].concat(isHorizontalDots ? [areaSize, size] : [size, areaSize]));
|
||||
cr.fill();
|
||||
@@ -1121,15 +1121,15 @@ export const TaskbarAppIcon = GObject.registerClass({
|
||||
|
||||
cr.translate(startX, startY);
|
||||
|
||||
Clutter.cairo_set_source_color(cr, bodyColor);
|
||||
cr.setSourceColor(bodyColor);
|
||||
cr.newSubPath();
|
||||
cr.rectangle.apply(cr, [0, 0].concat(isHorizontalDots ? [solidLength, size] : [size, solidLength]));
|
||||
cr.fill();
|
||||
Clutter.cairo_set_source_color(cr, blackenedColor);
|
||||
cr.setSourceColor(blackenedColor);
|
||||
cr.newSubPath();
|
||||
cr.rectangle.apply(cr, isHorizontalDots ? [solidLength, 0, 1, size] : [0, solidLength, size, 1]);
|
||||
cr.fill();
|
||||
Clutter.cairo_set_source_color(cr, darkenedColor);
|
||||
cr.setSourceColor(darkenedColor);
|
||||
cr.newSubPath();
|
||||
cr.rectangle.apply(cr, isHorizontalDots ? [solidDarkLength, 0, darkenedLength, size] : [0, solidDarkLength, size, darkenedLength]);
|
||||
cr.fill();
|
||||
@@ -1200,7 +1200,7 @@ export const TaskbarAppIcon = GObject.registerClass({
|
||||
|
||||
translate();
|
||||
|
||||
Clutter.cairo_set_source_color(cr, bodyColor);
|
||||
cr.setSourceColor(bodyColor);
|
||||
preDraw();
|
||||
for (let i = 0; i < n; i++) {
|
||||
cr.newSubPath();
|
||||
@@ -1697,7 +1697,7 @@ export const ShowAppsIconWrapper = class extends EventEmitter {
|
||||
// We want to keep the item hovered while the menu is up
|
||||
this._menu.blockSourceEvents = true;
|
||||
|
||||
Main.uiGroup.add_actor(this._menu.actor);
|
||||
Main.uiGroup.add_child(this._menu.actor);
|
||||
this._menuManager.addMenu(this._menu);
|
||||
}
|
||||
}
|
||||
|
||||
6
panel.js
6
panel.js
@@ -262,12 +262,12 @@ export const Panel = GObject.registerClass({
|
||||
],
|
||||
[
|
||||
this._centerBox,
|
||||
'actor-added',
|
||||
'child-added',
|
||||
() => this._onBoxActorAdded(this._centerBox)
|
||||
],
|
||||
[
|
||||
this._rightBox,
|
||||
'actor-added',
|
||||
'child-added',
|
||||
() => this._onBoxActorAdded(this._rightBox)
|
||||
],
|
||||
[
|
||||
@@ -553,7 +553,7 @@ export const Panel = GObject.registerClass({
|
||||
let parent = this.statusArea[propName].container.get_parent();
|
||||
|
||||
if (parent) {
|
||||
parent.remove_actor(this.statusArea[propName].container);
|
||||
parent.remove_child(this.statusArea[propName].container);
|
||||
}
|
||||
|
||||
//calling this.statusArea[propName].destroy(); is buggy for now, gnome-shell never
|
||||
|
||||
@@ -201,7 +201,7 @@ export const PanelManager = class {
|
||||
Panel.panelBoxes.forEach(c => this._signalsHandler.add(
|
||||
[
|
||||
Main.panel[c],
|
||||
'actor-added',
|
||||
'child-added',
|
||||
(parent, child) =>
|
||||
this.primaryPanel &&
|
||||
this._adjustPanelMenuButton(this._getPanelMenuButton(child), this.primaryPanel.monitor, this.primaryPanel.getPosition())
|
||||
@@ -246,7 +246,7 @@ export const PanelManager = class {
|
||||
} else {
|
||||
p.panelBox.remove_child(p);
|
||||
p.remove_child(p.panel);
|
||||
p.panelBox.add(p.panel);
|
||||
p.panelBox.add_child(p.panel);
|
||||
|
||||
p.panelBox.set_position(clipContainer.x, clipContainer.y);
|
||||
|
||||
@@ -363,7 +363,7 @@ export const PanelManager = class {
|
||||
this._scrollAdjustment,
|
||||
this._fitModeAdjustment,
|
||||
this._overviewAdjustment);
|
||||
Main.layoutManager.overviewGroup.add_actor(view);
|
||||
Main.layoutManager.overviewGroup.add_child(view);
|
||||
}
|
||||
|
||||
this._workspacesViews.push(view);
|
||||
@@ -421,7 +421,7 @@ export const PanelManager = class {
|
||||
Main.layoutManager.trackChrome(panelBox, { trackFullscreen: true, affectsStruts: true, affectsInputRegion: true });
|
||||
|
||||
panel = new Panel.Panel(this, monitor, panelBox, isStandalone);
|
||||
panelBox.add(panel);
|
||||
panelBox.add_child(panel);
|
||||
panel.enable();
|
||||
|
||||
panelBox.visible = true;
|
||||
|
||||
@@ -184,7 +184,7 @@ export const PanelStyle = class {
|
||||
this._applyStylesRecursively();
|
||||
|
||||
/* connect signal */
|
||||
this._rightBoxActorAddedID = this.panel._rightBox.connect('actor-added',
|
||||
this._rightBoxActorAddedID = this.panel._rightBox.connect('child-added',
|
||||
(container, actor) => {
|
||||
if(this._rightBoxOperations.length && !this._ignoreAddedChild)
|
||||
this._recursiveApply(actor, this._rightBoxOperations);
|
||||
@@ -192,7 +192,7 @@ export const PanelStyle = class {
|
||||
this._ignoreAddedChild = 0;
|
||||
}
|
||||
);
|
||||
this._centerBoxActorAddedID = this.panel._centerBox.connect('actor-added',
|
||||
this._centerBoxActorAddedID = this.panel._centerBox.connect('child-added',
|
||||
(container, actor) => {
|
||||
if(this._centerBoxOperations.length && !this._ignoreAddedChild)
|
||||
this._recursiveApply(actor, this._centerBoxOperations);
|
||||
@@ -200,7 +200,7 @@ export const PanelStyle = class {
|
||||
this._ignoreAddedChild = 0;
|
||||
}
|
||||
);
|
||||
this._leftBoxActorAddedID = this.panel._leftBox.connect('actor-added',
|
||||
this._leftBoxActorAddedID = this.panel._leftBox.connect('child-added',
|
||||
(container, actor) => {
|
||||
if(this._leftBoxOperations.length)
|
||||
this._recursiveApply(actor, this._leftBoxOperations);
|
||||
|
||||
12
taskbar.js
12
taskbar.js
@@ -227,7 +227,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
this._scrollView.connect('leave-event', this._onLeaveEvent.bind(this));
|
||||
this._scrollView.connect('motion-event', this._onMotionEvent.bind(this));
|
||||
this._scrollView.connect('scroll-event', this._onScrollEvent.bind(this));
|
||||
this._scrollView.add_actor(this._box);
|
||||
this._scrollView.add_child(this._box);
|
||||
|
||||
this._showAppsIconWrapper = panel.showAppsIconWrapper;
|
||||
this._showAppsIconWrapper.connect('menu-state-changed', (showAppsIconWrapper, opened) => {
|
||||
@@ -251,7 +251,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
this._hookUpLabel(this._showAppsIcon, this._showAppsIconWrapper);
|
||||
|
||||
this._container.add_child(new St.Widget({ width: 0, reactive: false }));
|
||||
this._container.add_actor(this._scrollView);
|
||||
this._container.add_child(this._scrollView);
|
||||
|
||||
let orientation = panel.getOrientation();
|
||||
let fadeStyle = 'background-gradient-direction:' + orientation;
|
||||
@@ -264,8 +264,8 @@ export const Taskbar = class extends EventEmitter {
|
||||
fade1.set_style(fadeStyle);
|
||||
fade2.set_style(fadeStyle);
|
||||
|
||||
this._container.add_actor(fade1);
|
||||
this._container.add_actor(fade2);
|
||||
this._container.add_child(fade1);
|
||||
this._container.add_child(fade2);
|
||||
|
||||
this.previewMenu = new WindowPreview.PreviewMenu(panel);
|
||||
this.previewMenu.enable();
|
||||
@@ -1442,7 +1442,7 @@ export const TaskbarItemContainer = GObject.registerClass({
|
||||
});
|
||||
|
||||
this._raisedClone.source.opacity = 0;
|
||||
Main.uiGroup.add_actor(cloneContainer);
|
||||
Main.uiGroup.add_child(cloneContainer);
|
||||
}
|
||||
|
||||
// Animate the clone.
|
||||
@@ -1544,7 +1544,7 @@ const DragPlaceholderItem = GObject.registerClass({
|
||||
height: iconSize
|
||||
});
|
||||
|
||||
this.add_actor(this._clone);
|
||||
this.add_child(this._clone);
|
||||
}
|
||||
|
||||
destroy() {
|
||||
|
||||
@@ -95,7 +95,7 @@ export const PreviewMenu = GObject.registerClass({
|
||||
y_expand: !this.isVertical
|
||||
});
|
||||
|
||||
this._scrollView.add_actor(this._box);
|
||||
this._scrollView.add_child(this._box);
|
||||
this.menu.add_child(this._scrollView);
|
||||
this.add_child(this.menu);
|
||||
}
|
||||
@@ -712,7 +712,7 @@ export const Preview = GObject.registerClass({
|
||||
let [previewBinWidth, previewBinHeight] = this._getBinSize();
|
||||
let closeButton = new St.Button({ style_class: 'window-close', accessible_name: 'Close window' });
|
||||
|
||||
closeButton.add_actor(new St.Icon({ icon_name: 'window-close-symbolic' }));
|
||||
closeButton.add_child(new St.Icon({ icon_name: 'window-close-symbolic' }));
|
||||
|
||||
this._closeButtonBin = new St.Widget({
|
||||
style_class: 'preview-close-btn-container',
|
||||
|
||||
Reference in New Issue
Block a user