rtlewis1 / GTK

GTK, xfwm4, openbox-3, GNOME-Shell, and Cinnamon themes
57 stars 3 forks source link

Missing GTK4 styles? #4

Open SimonPilkington opened 1 year ago

SimonPilkington commented 1 year ago

My Calculator currently looks like this with Material-Black-Blueberry 2.8.9. It seems like some styles for GTK4 aren't defined.

I used this to make the theme work with libadwaita applications. https://github.com/odziom91/libadwaita-theme-changer

image

SimonPilkington commented 1 year ago

The headerbar is missing a style for example:

image

rtlewis1 commented 1 year ago

Sorry you're having some issues with the theme, I'll try to help. We now provide both a legacy (LA) file and a (standard) file for Material-Black-Blueberry version 2.8.9. Have you tried them both by chance? If so, and you are continuing to have issues, please let me know your OS name and version, and the name of the affected apps. In case you got it from your OS repo, here is the link to both of current Material-COLORS sub-versions: https://www.pling.com/p/1316887/

I'll wait for your response, and we can go from there.

Best Regards, rtl88

SimonPilkington commented 1 year ago

These applications come as part of Gnome 42 and up which should be available in any rolling release distro. I am using Gnome 43 from Debian Sid.

The legacy file does not help. These are not legacy applications. These are new applications based on libadwaita (which is itself GTK4-based) and while they can use the system theme Material-Black is simply missing styles for them, presumably because libadwaita is relatively new. So new styles will need to be added if you want to support this use case.

For example I mostly fixed the calculator above and the Nautilus file manager by adding the following to gtk.css:


headerbar {
  min-height: 30px; 
  background-color: @theme_bg_color;
  color: @theme_text_color;
  box-shadow: inset 0 -1px @headerbar_shade_color, inset 1px 0 alpha(@headerbar_border_color,0.15), inset -1px 0 alpha(@headerbar_border_color,0.15); 
  margin-left: -1px;
  margin-right: -1px; 
}

headerbar:backdrop {
  background-color: @insensitive_bg_color;
  transition: background-color 200ms ease-out;
}

scrolledwindow {
  background-color: @theme_bg_color;
  color: @theme_fg_color;
}

shortcut > .keycap, list.content, list.boxed-list, .card
{
  background-color: @theme_bg_color;
  color: @theme_fg_color;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 1px 3px 1px rgba(0, 0, 0, 0.07), 0 2px 6px 2px rgba(0, 0, 0, 0.03);
}

.typed-text {
  color: @theme_fg_color;
}

row {
  border-radius: 0px;
}

.view, iconview, textview > text {
  color: @theme_fg_color;
  background-color: @theme_bg_color;
}

columnview.view > header > button > box, treeview.view > header > button > box {
  color: currentColor;
  font-weight: 700;
  font-size: 9pt;
  border-spacing: 6px;
}

But this is just a quick and dirty solution. If you do want to fix this in your theme you can run these applications with GTK_DEBUG=interactive set in their environment to make it simpler. This will open a browser-like inspector that will let you see which elements do not have a style defined in Material-Black.

rtlewis1 commented 1 year ago

I will forward this to our head developer. The culprit seems to point to the fact that Material-Black-COLORS is currently built on Gnome 42. We can't build on a bleeding edge or a super old version, because the bulk of users will be negatively effected - we aim to have ideal midpoint builds. Good find! I'll let you know what our progress is on everything. Thanks a bunch!

rtlewis1 commented 1 year ago

We are pushing out an extra "bleeding-edge" version (2.9.0), as we sometimes have to do, to handle Gnome 43 etc., better. It should be published on the Gnome Looks (Pling) site within the next couple of hours), and in the supporting OS repos soon after.

Thank you, again.

SimonPilkington commented 1 year ago

Thank you for the fast response. I will test this and give feedback soon.

SimonPilkington commented 1 year ago

I'm not seeing any changes with bleeding-edge unfortunately. Calculator and Nautilus still have unthemed elements same as before.

SimonPilkington commented 1 year ago

diff between bleeding-edge and normal also does not show it adding any of the missing styles, only some color values appear to have changed for the most part.

rtlewis1 commented 1 year ago

That is unfortunate. openSUSE Tumbleweed (GNOME 43) is not producing any anomalies on the Gnome calculator or any other apps. I will reiterate to my guy that Gnome 43 from Debian Sid is still offending in the ares you discussed. There must be a logical explanation. In the meantime, please accept my apologies.

SimonPilkington commented 1 year ago

No apologies needed. I would just like to see these newer applications supported if you guys are willing. That said, I'm not sure what's going wrong. Unfortunately I don't have time to set up an installation of Tumbleweed to see if everything indeed works as expected there.

What I'm seeing on Debian Sid is the Calculator as in my screenshot above even with bleeding-edge, and adding my additional styles above to gtk.css improves the situation, same as with standard.

D3vil0p3r commented 1 year ago

I have the same issue on Arc-Darkest themes that don't have GTK-4 style files. Having GTK-4 style for making themes compatible with GNOME 43 should be very good. I hope it will added soon. Thank you for your work!