jnsh / arc-theme

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

gtk3: Fix nautilus path bar #97

Closed drakkar1969 closed 3 years ago

drakkar1969 commented 3 years ago

Proposed fix for the border-only styling of the path bar - introduced with the re-positioning of the search button in the nautilus header. See https://github.com/jnsh/arc-theme/issues/96

pathbar-light

pathbar-dark

I have used lighten($header_bg, 5%) for the .path-bar background, which yields visual results very similar to those of the baobab path bar. The baobab path bar uses the $bg_color color variable, but this will not work for the Arc-Darker variant. This is actually a bug in the baobab path bar styling - which has a light path bar on dark background when using the Arc-Darker variant.

I had also attempted to use the $header_button_bg color variable (which seemed the obvious choice), but (IMO) this makes for too great a contrast between the path bar and the header.

Also includes a fix for the border radius of the path bar button, when the button is an only child. Currently, when the button is an only child, top-left/bottom-left border radius is 0, while it should be 3px.

jnsh commented 3 years ago

Since the path-bar-inside-a-headerbar is a common scenario (used at least in 3 separate gnome applications, probably more), I'd like to think of a common headerbar-pathbar design, that could be extended from a placeholder whereever necessary. In that regards, the background color addition would be merely a temporary workaround.

Additionally, simply applying a background to the .path-bar-box isn't a proper solution here: The path-bar buttons have transparent background, so the path-bar background color is seen trough the buttons, altering their appearance. Therefore the apparent button colors would be inconsistent with other similar buttons.

I'm also quite unhappy about the use of arbitrarily altered color values for common widgets, as it's a recipe for design spaghetti.

The border-radius fix is a very nice catch. I had not noticed this myself, and it's present from 3.32 onwards. I'll cherry pick the fix, and close this PR for clarity.

I was planning on looking at the path bar background after I got some other thing out the way. Let me know if you want to keep working on a more complete solution to it.