diff options
| author | Nippy <nippy@rp1.hu> | 2026-06-01 18:57:29 +0200 |
|---|---|---|
| committer | Nippy <nippy@rp1.hu> | 2026-06-01 18:57:29 +0200 |
| commit | 2e5a7d93476c0819b5a23f5740e4c843eaedc73a (patch) | |
| tree | 84279c63b84126eb8f6d9d94a42c44aabbe22336 /raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/dash.js | |
| parent | e1f0fac166056bb106284be4a3fec0c558525927 (diff) | |
| download | RaveOS-PKGBUILD-2e5a7d93476c0819b5a23f5740e4c843eaedc73a.tar.gz RaveOS-PKGBUILD-2e5a7d93476c0819b5a23f5740e4c843eaedc73a.zip | |
Raveos gnome update
Diffstat (limited to 'raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/dash.js')
| -rw-r--r-- | raveos-gnome-theme/theme-data/extensions/installed/dash-to-dock@micxgx.gmail.com/dash.js | 54 |
1 files changed, 42 insertions, 12 deletions
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); + 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'); + // 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'); + } } }); |