numixproject / numix-gtk-theme

A modern flat theme with a combination of light and dark elements.
GNU General Public License v3.0
1.2k stars 228 forks source link

Heterogenous borders under Unity (1px for non-CSD windows, no border for CSD windows) #664

Closed ronjouch closed 7 years ago

ronjouch commented 7 years ago

When used under Ubuntu Unity (16.04.2LTS), Numix shows 1px black borders for non-Client-Side-Decorated (CSD) windows (e.g. Firefox, Chrome, gnome-calc), and no border for CSD windows (e.g. Nautilus, Calendar, Totem). This feels strange to me, because:

  1. It's different from the experience of the same theme under Shell/Mutter, which never has borders.
    This could be argued with: to each their own appropriate experience.
  2. It deviates from default Ubuntu Ambiance, which never has borders.
    This could be argued with: Numix is not Ambiance.
  3. Also, a non-zero border means the scrollbar for such a window snapped to the right of the screen is no longer immediately accessible by just pushing the mouse to the rightmost (Fitt's Law).
  4. But most importantly, the presence of borders depends on whether the window is a CSD one, which makes no sense (or am I missing a good reason?).

→ I propose we get rid of them everywhere. If everyone agrees I'll be happy to propose a PR, and in the meantime I'll be rolling with UnityDecoration {-UnityDecoration-extents: 28px 0 0 0;} in my ~/.config/gtk-3.0/gtk.css 😃.

Thanks for the awesome work!

khurshid-alam commented 7 years ago

@ronjouch

1. Ubuntu patched gtk to solve dark background issue (#206) which in turn use transparent background and 1px wider border with titlebar (see #290 ).

  1. To tackle the issue we introduced 1px border for non-csd windows. Of-course we could remove border from both but then the window won't be re sizable outside for compiz session (mate, flashback, etc) outside unity.

  2. If we try to increase the window margin to tackle resize issue (#100) then we are back at #206 for ever other compiz session outside unity. Compiz doesn't have support csd windows at all, and it's broken for other themes including Ambiance.

  3. Ubuntu 16.04 uses Gtk-3.18. It has lots of other compiz/mutter/gtk bugs which got fixed in successive releases. For example, if theme doesn't overwrite nautilus window background (which happens on xfce and mate), all borders will be white. But for dark border it won't be visible as it paints dark border on dark black-area. Adwaita paints white on white area. But we can't do that as Numix is mixture of dark and light elements. I rather have dark border (or no border) instead of ugly white border.

  4. I recently added back window border for csd windows as well under unity. see bf8f3b078ae. I may do the same for 16.04 as well, providing it doesn't cause any trouble.

  5. We can't completely remove border/margin area until window manager implements it's own invisible resize area.

ronjouch commented 7 years ago

Awesome detailed response, @khurshid-alam 👍 💯, I didn't know about all these use cases, may you remain sane while covering all of them 😄. I'll live with my ~/.config/gtk-3.0/gtk.css workaround for now, and will anyway move back to Shell (where Numix doesn't have this quirk) when Ubuntu gets rid of Unity soon.

Thanks again.