lassekongo83 / adw-gtk3

The theme from libadwaita ported to GTK-3
GNU Lesser General Public License v2.1
1.48k stars 55 forks source link

Gnome Console alternate styles not themed #114

Closed flipflop97 closed 1 year ago

flipflop97 commented 2 years ago

Gnome Console has alternate headerbar styles when running a remote connection or when running a command as root. These are not styled with the Adwaita theme. Would it be possible to theme these?

normal

root

remote

lassekongo83 commented 2 years ago

I've tried, but I'm not entirely sure if the buttons are hardcoded or not. There's a .root css class in the headerbar, but with it I can only change the buttons borders a little bit, the rest just doesn't want to comply.

diegopvlk commented 2 years ago

I think the classes are .terminal-window.root and .terminal-window.remote

lassekongo83 commented 2 years ago

Works in gtk inspector, but not when applied to the theme. I'm clueless as to why.

diegopvlk commented 2 years ago

Yeah, same behaviour here.

As an alternative solution @flipflop97, add this to ~/.config/gtk-3.0/gtk.css:

/* gnome-console, kgx */
.terminal-window.root headerbar button:not(.titlebutton),
.terminal-window.remote headerbar button:not(.titlebutton) {
  min-width: 16px;
  background: transparent;
  border: 1px solid transparent;
}

.terminal-window.root headerbar button:not(.titlebutton):hover,
.terminal-window.remote headerbar button:not(.titlebutton):hover,
.terminal-window.root headerbar button:not(.titlebutton):checked,
.terminal-window.remote headerbar button:not(.titlebutton):checked,
.terminal-window.root headerbar button.titlebutton,
.terminal-window.remote headerbar button.titlebutton {
  background: alpha(white, 0.12);
}

.terminal-window.root headerbar button:not(.titlebutton):active,
.terminal-window.remote headerbar button:not(.titlebutton):active,
.terminal-window.root headerbar button:not(.titlebutton):checked:hover,
.terminal-window.remote headerbar button:not(.titlebutton):checked:hover,
.terminal-window.root headerbar button.titlebutton:hover,
.terminal-window.remote headerbar button.titlebutton:hover {
  background: alpha(white, 0.18);
}

.terminal-window.root headerbar button.titlebutton:active,
.terminal-window.remote headerbar button.titlebutton:active {
  background: alpha(white, 0.3);
}
ItsKruistz commented 2 years ago

I see that Console is now ported to GTK4 and libadwaita (https://thisweek.gnome.org/posts/2022/07/twig-54/), so just wait until the distributions packages that version and we don't need it anymore except those who uses a distribution that still ships with GTK3 Console