jnsh / arc-theme

A flat theme with transparent elements (actively maintained fork)
GNU General Public License v3.0
906 stars 78 forks source link

Ubuntu Dock gets wide margins, items spaced out #190

Open Schyrsivochter opened 2 years ago

Schyrsivochter commented 2 years ago

On Ubuntu, starting with 21.10 (GNOME 40), Arc GNOME Shell themes don’t play nice with Ubuntu Dock any more.

In panel mode, instead of the dock fitting flush between screen edges, top bar, and desktop space, there is a margin left, right, and above; on the bottom, the dock and Applications button drop below the edge of the screen. Also, the dock items are spaced far too widely vertically, and the open window indicator dots are too close to their icons.

Yaru-dark (default): image Arc-Dark: image Another screenshot with a maximised window, showing right margin: image

Screenshots taken on Ubuntu 22.04 LTS with Ubuntu package arc-themes version 20220405-1.

Switching panel mode off through Ubuntu Settings, the left and right margin and wide spacing issues persist. Also, the behaviours of the Arc and Arc-Dark GNOME Shell themes are identical.

froger-me commented 2 years ago

Same issue here

jnsh commented 2 years ago

I can't reproduce this with ubuntu dock v72 on GNOME Shell 42. I'm fairly sure early GNOME 40 port of the dash-to-dock extension (which is essentially the same as ubuntu dock) had similar issues. Therefore my initial assumption is that Ubuntu 21.10 is shipping with dock that still has those issue, but they have been worked around in the ubuntu theme, or by some other manner.

Would you mind testing whether you still have this issue with latest ubuntu-dock or dash-to-dock version 72 (version 70 and never should support GNOME 40)? If the problem persists, I'll have a further look.

I'm also curious whether the same issue happens with the default Adwaita shell theme, but it may have been overridden in ubuntu with their own theme...

froger-me commented 2 years ago

I'm running 22.04, with Ubuntu dock v71 (? not sure why, my 22.04 is a fresh install) and GNOME 42. I've temporarily fixed my issues by manually editing a bunch of padding and margin properties in gnome-shell.css in Arc-Dark (the flavor I'm using - unfortunately I tinkered without really keeping track, most edits were around line 749 .dash-item-container .app-well-app, .show-apps but here's a gist).

jnsh commented 2 years ago

v72 should be available for ubuntu 22.04: https://packages.ubuntu.com/jammy/gnome-shell-extension-ubuntu-dock

Would you mind testing with it, and without any modifications to the Arc shell theme, or the extension?

AFAIK, the package from 22.04 should work with older ubuntu releases as well, as long as it is using GNOME 40 or later.

froger-me commented 2 years ago

hmmm, it seems I spoke too fast re: version

$sudo apt upgrade gnome-shell-extension-ubuntu-dock
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gnome-shell-extension-ubuntu-dock is already the newest version (72~ubuntu5).

I saw 71 in the Extensions app, and to be blunt I'm a bit out of my depths here regarding the inner workings of the ecosystem.

jnsh commented 2 years ago

Apparently it it shows version 71 in the extensions app for me too, even though the package is v72. They probably just forgot to update the version to the extension metadata.

Thanks for the help with testing. I'll dig deeper in this

Schyrsivochter commented 2 years ago

Same here. Extensions shows version 71, package version is 72~ubuntu5.

jnsh commented 2 years ago

This seems to result from some Ubuntu specific difference, although I couldn't figure out the exact cause. It doesn't seem reasonable to fix every distro-specific oddity within the theme in any case, so I'm not planning on looking for it any further.

However, you can work around the issue in Ubuntu at least by two ways:

I'm best guess is, that this results from Yaru theme being overridden as the default shell theme when using Ubuntu session. The user-theme extension works by applying custom themes against the default theme, and presumably when Arc is applied against Yaru, the ubuntu-dock theming gets broken. This doesn't happen with the GNOME session, where custom theme is applied against the default Adwaita shell theme.

I have not confirmed this definitely, but if I'm correct, this could be considered a bug in Yaru, especially if the same issue happens with other custom themes besides Arc. Either way, some difference in the Ubuntu session vs GNOME session is certainly resulting in this behavior.

froger-me commented 2 years ago

Personally, I've hotfixed it directly in CSS, so I'm not too bothered, but I'm thinking something more solid is still worth some consideration.

jnsh commented 2 years ago

I'm happy to to apply a fix if there was one. I've compared stylesheets of Yaru, Adwaita, Arc, and now Materia as well, and still have no idea what could cause this.

Either way, the theme is designed to work with default unmodified GNOME Shell, and if any distribution adds custom tweaks that break it, I consider it to be a bug in the distribution, regarless of how popular that distribution is.

Again, there should be nothing stopping from using regular GNOME session in Ubuntu, if it doesn't work for you by simply installing gnome-session, you should seek help from the distribution's support channels.

Unfortunately the dash-to-dock extension in gnome extensions page has not been updated for GNOME 42 yet, so that install method is currently unavailable for Ubuntu 22.04. However there are other install methods available.

If you are already modifying the default Ubuntu session by changing the theme, I don't think switching to regular GNOME session, or using alternative dock extension shouldn't be too big deal. Even if a fix was applied for Arc, that wouldn't be available for Ubuntu users unless they installed the theme by some other means than the package from repos.

dgutov commented 1 year ago

@froger-me Could you post the diff with your fix?

dgutov commented 1 year ago

@jnsh

Even if a fix was applied for Arc, that wouldn't be available for Ubuntu users unless they installed the theme by some other means than the package from repos.

I would imagine their repos will package the fix too sooner or later, won't tey?

dgutov commented 1 year ago

FWIW, disabling Ubuntu Dock and installing the "Dash to Dock" extension which has been updated for Gnome 43 by now, has fixed a similar problem for me (with other shell themes, haven't tested this particular one yet).