LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Anybody familiar with GTK+3.x theming? Looking for help with gtk.css override. (https://www.linuxquestions.org/questions/linux-software-2/anybody-familiar-with-gtk-3-x-theming-looking-for-help-with-gtk-css-override-4175557052/)

beanaroo 10-24-2015 12:15 PM

Anybody familiar with GTK+3.x theming? Looking for help with gtk.css override.
 
Please see: https://github.com/Airblader/i3/issues/42

I would like to implement a simple gtk.css override instead of loading a library to disable CSD. Something along the lines of:
Code:

.window-frame {border-style: solid; border-width: 4px; border-color:#373b41}

.window-frame:focus {border-color: #81a2be}

Nothing I have tried worked. I tried different states as mentioned in https://git.gnome.org/browse/gtk+/tr...elector.c#n735. I also tried using gtk-inspector and using the .solid-csd class.

I can't get all apps to obey the border (Specifically Gedit/Builder). I also can't get the border to change on focus.

Any help is greatly appreciated.

wchouser3 10-26-2015 01:36 AM

it's necessary you have a complete config file before it will be recognized. Here's an example:

it needs to be located in: ~/.config/gtk-3.0/gtk.css
Code:

.window-frame, .window-frame:backdrop {
 box-shadow: 0 0 0 black;
 border-style: none;
 margin: 0;
 border-radius: 0;
}

.titlebar {
 border-radius: 0;
}

.window-frame.csd.popup {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.13);
}

.header-bar {
  background-image: none;
  background-color: #ededed;
  box-shadow: none;
}
/* You may want to use this if you don't like the double title.
GtkLabel.title {
    opacity: 0;
}*/

https://wiki.archlinux.org/index.php/GTK%2B

beanaroo 10-26-2015 03:24 AM

Thank you for responding, wchouser3, but not true. It's just an override file. Even the code posted isn't a "complete" theme. I am aware of the Arch Wiki article but the code isn't relevant. Please look at my question again. I am trying to accomplish something different.

I want to add a window border and change its color depending on its state.

debguy 10-26-2015 01:46 PM

mozilla firefox, when they attacked X11 (refused to stop making X11 compatible releases - forcing use of GTK) ...

ff uses "phone home code". when you start any year 2000+ firefox it phones home to get a file to interpet that controlls the web browser (usually harmlessly: but it changes fonts and people for years complained it ruined their X11 desktop, chose wrong every time)

but you never know when the "phone home servers" might get tampered with and be used to attack or upload glitches or viruses "to make people upgrade" or to even spy on people. "THERE IS ONLY ONE XUL". search for that. it's evidence.

i know parts of GTK phone home. i know firefox uses foo.css similarly and it phones home (also guess what: the only one xul prevents foo.css local changes from correcting menu fonts; what an only one B*tch)

perhaps new GTK is using this same new "technology"

debguy 10-26-2015 01:49 PM

i'm waiting until i get a touch screen + GL drivers (permidia GL all in silicon drivers) to try gtk3. though maybe it's worth using on a 1GHz computer w/o touch screen for other reasons: that i'd like to know.

beanaroo 10-26-2015 05:36 PM

???

That's even more irrelevant... I'm talking about a stylesheet, nothing more.


All times are GMT -5. The time now is 11:28 PM.