lunakurame / firefox-gnome-theme

A theme for Firefox 57+ matching GNOME Adwaita.
The Unlicense
200 stars 15 forks source link

Go back button doesn't scale properly on some systems #17

Closed lunakurame closed 6 years ago

lunakurame commented 6 years ago

The "go back" button seems to look fine on my system and any other system I run on a virtual machine, but it seems to not scale properly for some people, eg. it was reported to be too big in issue #2 (Firefox 57), also it seems blurred (slightly too big?) on the screenshots from issue #7 (Firefox 58 or 59).

It would be nice if anyone could find a reason why does it behave like that, or any way for me to reproduce it, so I can fix it.

smithfred commented 6 years ago

The offending rule is:

#back-button > .toolbarbutton-icon {
    width: 30px !important;
}

The standard rule from browser.css is:

#back-button > .toolbarbutton-icon {
    width: calc(2 * var(--toolbarbutton-inner-padding) + 16px);
}

This results in a computed value of 26px (16px, plus 5+5px padding) instead of 30px.

I think you'll find that the "some systems" seeing this problem have "Compact" density selected in Firefox's "Customise" UI instead of "Normal" - removing the above rule fixes the oversized/blurry icon in that case ;)

On the other hand, with "Normal" density the back icon looks undersized without the 30px rule.

HTH

ghost commented 6 years ago

Hey, you're totally right. With this theme, the density is no longer important, so changing it back to 'Normal' permanently fixes the issue.

rafaelmardojai commented 6 years ago

I can confirm that, i noticed the same behavior.

smithfred commented 6 years ago

I just checked, the back arrow is pixel-identical with either normal density + rule or compact density + no rule.

Maybe make the rule conditional on the current density, if there's a CSS attribute/class for it?

lunakurame commented 6 years ago

Well then I'd say just switching to normal density is a good solution. Compact and touch density aren't supported anyway, they break paddings in more places than just this icon and when you switch to touch density everything looks bad. All the icons are underscaled, all buttons are fat, tab close buttons shrink to like 1px high.

Firefox 57 + Gnome theme + touch density

I would rather focus on expanding support to Firefox 58, which is gonna be released on January 28, than debugging everything to fix those paddings which can be disabled in 2 clicks by the user and are disabled by default anyway. Also I noticed the icon is still too small even using normal density on Firefox 58+, so that's something which must be fixed before the FF58 release. Also on FF58 the headerbar isn't high enough (probably the reason why the styles for Fedora's CSD patch don't exactly work with FF59) and disabled buttons look too flat. I'll try to fix all these in January. As for Firefox 57, the problem doesn't exist if you use normal density, so I'd say the issue is resolved.

Thank you all for figuring this out and testing the solution, I totally forgot about that density switch.