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

Closing nautilus (files) in GNOME 3.22-3.24.1 resize window vertically #667

Closed leipero closed 7 years ago

leipero commented 7 years ago

So, I don't know since when this problem is, but, when open-close nautilus (files) in GNOME, vertical size of the windows changes by -4px, so, for example, if nautilus size was: 836x526+217+162 after starting and closing nautilus (specifically closing), size changes to: 836x522+217+162

I've spent about 1 hour changing settings in gtk-3.20 CSS trying to identify a problem, but with my knowledge I wasn't able to find it, changing scale settings etc. resulted in no change of behavior.

To clarify, this isn't the problem on otehr themes.

khurshid-alam commented 7 years ago

Distro? Theme version?

It may be the problem with icon theme. Which icon theme you are using?

leipero commented 7 years ago

Arch Linux, theme from the repository (numix-gtk-theme 2.6.6-1), i think same is from master last time i tried. I'm using Numix-Circle icon theme, but other themes do not have that problem with that icon theme, it's the same behaviour with Adwaita icon theme, so i don't think it is.

khurshid-alam commented 7 years ago

2.6.6 is old. Try again from master and post some screenshot comparing sizes.

leipero commented 7 years ago

Same is with master, I don't know if screenshot is valid way to do it, it will just show two different sizes, instead i can put small video.

removed video.

leipero commented 7 years ago

The issue is introduced between versions 2.6.1 and 2.6.3, I'm looking at changes now, thought this information could help.

khurshid-alam commented 7 years ago

Thanks.

On Ubuntu, I can actually reproduce this (more visible) with nautilus > 3.22 after Ubuntu patches back primary-toolbar class in their traditional title-bar patch. (https://bugs.launchpad.net/ubuntu/+source/gnome-contacts/+bug/1689239).

leipero commented 7 years ago

Problem started since this commit: https://github.com/numixproject/numix-gtk-theme/commit/6cb9d03b04d9cf6aac92bc1d8dee6d20060e6a7e

khurshid-alam commented 7 years ago

Yes. We can not decorate linked-button inside box button . box is not really a widget. I removed padding from it after it causing some issues. (Previously it was using $spacing $spacing + 2, hence extra 2+2 =4 px padding for top/bottom). Let's see if I can fix it without using box or using some other sub class.

leipero commented 7 years ago

Great, at first i thought is typo in line - 4, but yeah.

Side note, should I open new issue for gnome-terminal and other applications where decoration size is not consistent with CSD size?

khurshid-alam commented 7 years ago

Please open a new issue.

leipero commented 7 years ago

Ok, I made a mistake in previous post (that's why i deleted it), changing /src/gtk-3.20/scss/widgets/_button.scss in master actually solves the problem without messing with padding:

    %button {
        min-height: 20px;

Setting anything below 20px changes size acordingly (if set 18px, it changes size by 2px instead of 4px). Is there any reason why this is commented to begin with? Because there's another side effect of changing this, if not set (original git version) gnome-tweak-tool titlebar is smaller than nautilus (CSD) titlebar, when set, size is as it should (?) be, the same. Current master: 2017-05-11 08-44-38 When "min-height: 20px" is set: 2017-05-11 08-44-00

I didn't touch anything else in master.

khurshid-alam commented 7 years ago

No. Global button can't change in that way. Many apps requests 16x16 for their toolbar. If min button size is greater than it will cause many issues like header-bar not falling in-line. We have carefully thought this through.

This issue is not related to button sizes, but rather something to do with either default decoration with titlebar or with csd . It works properly for non-headerbar apps and many other headerbar apps.

leipero commented 7 years ago

Ok, that's why i ask :), I tought it could be helpful to add. Maybe changing CSD size to fit size of titlebar by 4px could be partial solution untill problem is adressed, just trowing it out there, I don't know.

For me, i can use the theme without annoyance now, and so far I didn't notice any problem, but will see.

khurshid-alam commented 7 years ago

I can reproduce with Adwaita as well. Nautilus resets the size when closing manually to the default decoration size.

leipero commented 7 years ago

I can't reproduce it with Adwaita (or any other theme) on Arch GNOME version 3.24.2, not sure if should be closed. Where did you reproduced it?

khurshid-alam commented 7 years ago

On Ubuntu. It is also possible that it happens due to Ubuntu's patches..

leipero commented 7 years ago

Ok, as far as I know Arch doesn't use any patches, it's as close to "vanilla" as it can be, so maybe better option for testing any GTK+ theme is on Arch VM or something. I usually keep Ubuntu VM to try it when editing, don't have it at the moment tho. It might make more sense to test it on such Arch VM since Ubuntu is going towards unpached GNOME with 17.10, and it would be good for theme to be ready till then.