jnsh / arc-theme

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

Sharp corner with GtkStack in titlebar #56

Closed johnfactotum closed 4 years ago

johnfactotum commented 4 years ago

This can be seen in Epiphany:

image

Notice the top right corner is not round. When clicking on the "Tabs" button (the last button in the action bar), the right corner will be rounded, but the left will now be square.

Adwaita, for comparison:

image

I think this happens when a GtkStack is used to house many headerbars. Also happens in Foliate 2.3.0.

jnsh commented 4 years ago

Thank you for the report. Looks like this issue has been reported to libhandy and GTK, and has been fixed for Adwaita with https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/322.

Most likely it should be possible to port the Adwaita fix for Arc. I'll have a look at some point.

johnfactotum commented 4 years ago

It's not exactly the same issue. The situation for HdyLeaflet is more complicated because of the sliding animations and split headerbars. In this case, it's just a stack, showing only one child at a time.

In Adwaita I think they've had this for a long time now:

headerbar { // headerbar border rounding

  // ...

  window stack & { // tackles the stacked headerbars case
    &:first-child, &:last-child {
      &:backdrop, & {
        border-top-left-radius: 7px;
        border-top-right-radius: 7px;
      }
    }
  }

 // ...

}

https://gitlab.gnome.org/GNOME/gtk/-/blob/badbde5041382695122107bd7b48230fb58e9b83/gtk/theme/Adwaita/_common.scss#L1833

jnsh commented 4 years ago

Thanks, that could be related to this as well. Hard to tell for certain without digging in deeper.

If the fix is more complicated, it may have to wait until I manage to do a complete resync for the GTK3 theme with Adwaita. Some parts of the Arc GTK3 theme (such as the headerbar code here) are badly outdated compared to upstream, which makes bug fixing and general maintenance difficult, and may directly result in some unexpected issues..

jnsh commented 4 years ago

This was indeed caused by the missing styling for stacked headerbars, just as you suggested. Should be fixed with the above commit.

Thanks again for the report, and help.