Web lists-archives.com

Re: CSS to look more like Gtk+ 2




Le primidi 21 frimaire, an CCXXV, Kyle Terrien a écrit :
> I also dislike the new "Adwaita" look.  (Phone-sized buttons?  Pah!)
> 
> This guy has done quite a job of creating a Raleigh-like (and
> NeXTSTEP-like) theme that works in both GTK2 and GTK3 (3.18 and 3.20).
> This is probably a good place to start.  He calls his theme OneStepBack.
> https://www.gnome-look.org/p/1013663/
> 
> I used his CSS as a starting point in my project:  (It works in GTK
> 3.20 and 3.22 for the most part.)
> https://gitlab.com/KlipKyle/Blueshell
> 
> And now, I'm starting another theme, this time Raleigh-like.  I have
> not come around to GTK3 yet, but I will get there eventually.  This
> time, I will be doing GTK 3.18 first, because that is what is in
> Slackware. (But don't be surprised if you see a lot of OneStepBack-like
> CSS.)
> https://github.com/KlipperKyle/Irvine

Thanks to everybody who answered in this thread.

The styles pointed here do not match my tastes, but I will definitely
keep the pointers to use as a reference. In the meantime, I have
achieved a rather short CSS file that fixes the worst of the worst. See
below.

> Not that I know of, but I am far from an expert in this area.  I am
> just someone so sick of the "new look" that I felt the urge to start
> designing my own themes.  If you find a way, please let me know.  I
> don't like client-side decorations either.

Michael suggested PCMan/gtk3-nocsd. I knew of it. Unfortunately, it uses
LD_PRELOAD, if I read it correctly, and this has dramatic consequences.
For example, it probably becomes impossible to run a non-Gtk application
from a gtk3-nocsd-ed one.

I think a more reliable approach would be to `apt-get source libgtk-3-0`,
edit gtk/gtkwindow.c, change gtk_window_should_use_csd() to give more
precedence to $GTK_CSD than to priv->csd_requested, and then build and
install.

And maybe the Debian maintainers would be more amenable to the principle
that the user should be the one to decide eventually.

> Another note: GTK 3.18 CSS is entirely different from GTK 3.20 and
> later.  Why?  I don't know.  I guess people like to break things.  ;-)

It is a tragedy that Gtk+ has turned into the Gnome credo of knowing
better than users what is good for them.

And it compounds the tragedy that Gtk+ was the only toolkit in the Libre
software world that is not either awful or for an awful language or
both.

Regards,

-- 
  Nicolas George


My current efforts at getting gtk-2-style look (please feel free to
consider it Public Domain), currently fixing buttons, entry lines and
scrollbars:

/*

export GTK_OVERLAY_SCROLLING=0

See also theme/Raleigh/gtk-default.css

*/

@define-color cig_back #dcdad5;
@define-color cig_side shade(@cig_back, 0.7);

@define-color cig_back_hover shade(@cig_back, 1.09);
@define-color cig_side_hover shade(@cig_back_hover, 0.7);

@define-color cig_back_active shade(@cig_back, 0.9);
@define-color cig_side_active shade(@cig_back_active, 0.7);

* {
  font-size: 12px;
  border-radius: 0;
  transition: none;
}

window {
  background: @cig_back;
}

button,
scrollbar slider {
  box-shadow: 1px 1px 0 #000;
  background: @cig_back;
  border: outset 1px @cig_side;
}
button:hover,
scrollbar slider:hover {
  background: @cig_back_hover;
  border: outset 1px @cig_side_hover;
}
button:active {
  box-shadow: 1px 1px 0 #000 inset;
  background: @cig_back_active;
  border: inset 1px @cig_side_active;
}

button {
  padding: 0;
}

entry {
  min-height: 21px;
  padding: 0 3px;
  border: inset 1px @cig_side;
  box-shadow: -1px -1px 0 @cig_back inset, 1px 1px 0 black inset;
}

* {
  -GtkScrollbar-has-backward-stepper: true;
  -GtkScrollbar-has-forward-stepper: true;
}
scrollbar {
  border: inset 1px @cig_side;
}
scrollbar button {
  min-width: 9px;
  min-height: 9px;
}
scrollbar.vertical   { min-width:  12px; }
scrollbar.horizontal { min-height: 12px; }
scrollbar.vertical   slider { min-width:  9px; margin: 1px 0; }
scrollbar.horizontal slider { min-height: 9px; margin: 0 1px; }

Attachment: signature.asc
Description: Digital signature

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list