From 2e5a7d93476c0819b5a23f5740e4c843eaedc73a Mon Sep 17 00:00:00 2001 From: Nippy Date: Mon, 1 Jun 2026 18:57:29 +0200 Subject: Raveos gnome update --- .../dash-to-dock@micxgx.gmail.com/dash.js | 56 +++++++++++++++++----- 1 file changed, 43 insertions(+), 13 deletions(-) (limited to 'raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/dash.js') diff --git a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/dash.js b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/dash.js index 956bbeb..a650f38 100644 --- a/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/dash.js +++ b/raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/dash.js @@ -17,6 +17,7 @@ import { } from './dependencies/shell/ui.js'; import { + Config, Util, } from './dependencies/shell/misc.js'; @@ -120,6 +121,14 @@ export const DockDash = GObject.registerClass({ 'requires-visibility', 'requires-visibility', 'requires-visibility', GObject.ParamFlags.READWRITE, false), + 'max-width': GObject.ParamSpec.int( + 'max-width', 'max-width', 'max-width', + GObject.ParamFlags.READWRITE, + -1, GLib.MAXINT32, -1), + 'max-height': GObject.ParamSpec.int( + 'max-height', 'max-height', 'max-height', + GObject.ParamFlags.READWRITE, + -1, GLib.MAXINT32, -1), }, Signals: { 'menu-opened': {}, @@ -1056,6 +1065,22 @@ export const DockDash = GObject.registerClass({ this._showAppsIcon.visible = false; } + get maxWidth() { + return this._maxWidth; + } + + get maxHeight() { + return this._maxHeight; + } + + set maxWidth(maxWidth) { + this.setMaxSize(maxWidth, this._maxHeight); + } + + set maxHeight(maxHeight) { + this.setMaxSize(this._maxWidth, maxHeight); + } + setMaxSize(maxWidth, maxHeight) { if (this._maxWidth === maxWidth && this._maxHeight === maxHeight) @@ -1074,10 +1099,13 @@ export const DockDash = GObject.registerClass({ const notifiedProperties = []; const showAppsContainer = settings.showAppsAlwaysInTheEdge || !settings.dockExtended ? this._dashContainer : this._boxContainer; + const needsFirstLastChildWorkaround = Config.PACKAGE_VERSION.split('.')[0] < 49; - this._signalsHandler.addWithLabel(Labels.FIRST_LAST_CHILD_WORKAROUND, - showAppsContainer, 'notify', - (_obj, pspec) => notifiedProperties.push(pspec.name)); + if (needsFirstLastChildWorkaround) { + this._signalsHandler.addWithLabel(Labels.FIRST_LAST_CHILD_WORKAROUND, + showAppsContainer, 'notify', + (_obj, pspec) => notifiedProperties.push(pspec.name)); + } if (this._showAppsIcon.get_parent() !== showAppsContainer) { this._showAppsIcon.get_parent()?.remove_child(this._showAppsIcon); @@ -1092,16 +1120,18 @@ export const DockDash = GObject.registerClass({ showAppsContainer.set_child_above_sibling(this._showAppsIcon, null); } - this._signalsHandler.removeWithLabel(Labels.FIRST_LAST_CHILD_WORKAROUND); - - // This is indeed ugly, but we need to ensure that the last and first - // visible widgets are re-computed by St, that is buggy because of a - // mutter issue that is being fixed: - // https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2047 - if (!notifiedProperties.includes('first-child')) - showAppsContainer.notify('first-child'); - if (!notifiedProperties.includes('last-child')) - showAppsContainer.notify('last-child'); + if (needsFirstLastChildWorkaround) { + this._signalsHandler.removeWithLabel(Labels.FIRST_LAST_CHILD_WORKAROUND); + + // This is indeed ugly, but we need to ensure that the last and first + // visible widgets are re-computed by St, that is buggy because of a + // mutter issue that is being fixed: + // https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2047 + if (!notifiedProperties.includes('first-child')) + showAppsContainer.notify('first-child'); + if (!notifiedProperties.includes('last-child')) + showAppsContainer.notify('last-child'); + } } }); -- cgit v1.3