Skip to content
This repository has been archived by the owner on May 14, 2020. It is now read-only.

Header bars with separators in them show as light lines for dark variants #74

Open
aperezdc opened this issue May 2, 2018 · 13 comments

Comments

@aperezdc
Copy link

aperezdc commented May 2, 2018

I've noticed this while using Fractal (a Matrix IM client). Its main window header bar has a GtkStack with two GtkHeaderBar elements and a GtkSeparator in between. The separator shows as a white/light line, which looks jarring in the dark theme variants.

Using the following CSS snippet from the GTK+ inspector seems to do the trick to fix this issue for Fractal:

window.csd stack separator.vertical {
	background-color: #282828;
}

(Probably using window.csd separator in the CSS selector is enough and more general, dunno!)

You can see the white line in the following GIF, and how the CSS snippet being applied from the inspector changes it to a dark line:

csd-stack-separator

Details

  • Distribution: Arch Linux (no version, rolling release)
  • Desktop environment: GNOME 3.28.1
  • Arc version/commit: 20180114-1
  • GTK+ 3 version: 3.22.30-1
    • Murrine engine version: 0.98.2-3
    • gnome-themes-standard version: none
  • Installation method: package from the “community” repository.
@NicoHood NicoHood added the Gnome label May 5, 2018
@NicoHood
Copy link
Collaborator

NicoHood commented May 5, 2018

I am using the darker theme with global dark theme enabled. In the application "Dino" I have a similar layout, but i dont see this issue. I am also using Arch Linux with gnome. Does your issue also appear with the darker theme and global dark theme enabled?

screenshot from 2018-05-05 13-26-39

@aperezdc
Copy link
Author

aperezdc commented May 19, 2018

@NicoHood: I have installed Dino (it's a neat application that I didn't know!), disabled my CSS hack in gtk.css, and ran it... but it shows correctly. There might be something that Fractal and Dino are doing differently. Here you have their headerbars running at the same time:

dino-and-fractal

(I took screenshots of both application windows and then stitched them together in GIMP; Fractal's was wider and I left the close button out of the image.)

@NicoHood
Copy link
Collaborator

NicoHood commented May 19, 2018

Alright. Could you please prepare a pullup request for the fix. Also make sure that you are using the color variables and no fixed color value ;)

Just to clarify: This only happens with arc, right? Not with other themes, so its no faul of the application you are using?

@NicoHood NicoHood added this to the 2018_xx_xx milestone May 19, 2018
@NicoHood NicoHood added the bug label May 19, 2018
@NicoHood
Copy link
Collaborator

NicoHood commented Jul 8, 2018

Any chance that you do a pullup request until next sunday? We can include it into the next release then.

@NicoHood NicoHood modified the milestones: 2018_07_22, Next Release Jul 11, 2018
@NicoHood
Copy link
Collaborator

@jnsh could you please have a look at this? Its the last bug to fix for the next release. Or we just skip it.

@jnsh
Copy link
Contributor

jnsh commented Oct 20, 2018

Frankly, I wouldn't like to create a matrix account just that I could test this small issue, that may be already fixed upstream.

@aperezdc Could you confirm whether this issue is still present with latest fractal version? If it's still there, I can have a look.

@NicoHood NicoHood removed this from the Next Release milestone Oct 21, 2018
@aperezdc
Copy link
Author

This glitch is still happening in Fractal 3.30.0, let me know if there is something I can check on my side to help solve this.

@NicoHood
Copy link
Collaborator

@aperezdc Could you please try our new release from a few days ago? If not, check if your patch stil works and please prepare a PR :)

@aperezdc
Copy link
Author

@NicoHood I can confirm that the issue is still happening with the 20181022 release. To be honest, I don't know what the proper fix would be. Looking at the differences between Dino and Fractal using the GTK+ inspector, I can see that Fractal has the following widgets in the header bar:

GtkStack
   GtkHeaderBar
   GtkSeparator
   GtkHeaderBar

while Dino has the following:

GtkPaned
   DinoUiConversationListTitlebar
   DinoUiConversationTitlebar

I have no idea how Dino's theming can be painting a separator when there is none in the widget hierarchy... but that's likely the cause of its separator being correctly dark.

Any suggestions of what to touch in the theme CSS? Or do you think this might be an issue in Fractal after all?

@jnsh
Copy link
Contributor

jnsh commented Oct 25, 2018

I investigated the issue with gtk+ inspector and I think this could probably be considered an issue with Fractal.

The GtkSeparator widgets are themed correctly in Arc. I could confirm this myself with gnome-tweaks. However, it seems that Fractal also applies the titlebutton CSS class to the vertical separator in question, and I think that's messing up the background-color.

@aperezdc Would you mind testing my theory, by removing the titlebutton class from the separator in gtk inspector?

To do this, select some object, and from the drop-down menu on top-left, choose "CSS nodes". From there, find the separator widget, double-click the "Style Classes" column, and from the opening popover delete the titlebutton class by clicking the trash icon on the right.

I hope I explained that clearly enough. Here's a screenshot that might help.
screenshot from 2018-10-25 11-34-20

If removing the titlebutton class fixes the separator color, I think this should be reported as an upstream issue to Fractal. You could also check if you can reproduce the issue with other themes, most importantly Adwaita and Adwaita-Dark.

I think it should be possible to work around the issue in the gtk theme as well, if upstream fix is out of the question for whatever reason.

@ghost
Copy link

ghost commented May 24, 2019

@jnsh

I think this should be reported as an upstream issue to Fractal.

Asked on #fractal-gtk:matrix.org and this is what one of the devs said.
image

@jnsh
Copy link
Contributor

jnsh commented May 24, 2019

@kakolisgay Thank you for checking with upstream. I'll work on a fix for this..

@jnsh
Copy link
Contributor

jnsh commented Jun 16, 2019

This should have been already fixed with 2c45d9e, at least for Fractal 4.0. However, the styling between &:dir(ltr) and &:dir(rtl)selectors didn't get picked up in Fractal for some reason that I couldn't figure out.

The aforementioned fix was somewhat incomplete from the beginning, so I worked out a proper fix, that should be used instead of the previous one: jnsh/arc-theme@9b7e702

Note that I didn't test this with Fractal versions earlier than 4.0 (and there's been some changes to its headerbar's styling since this issue was opened), but I'm pretty sure it should fix headerbar separators in most cases.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants