LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-24-2015, 12:15 PM   #1
beanaroo
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Rep: Reputation: Disabled
Question 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.
 
Old 10-26-2015, 01:36 AM   #2
wchouser3
Member
 
Registered: May 2013
Location: Fort Wayne, Indiana
Distribution: Arch Linux
Posts: 74

Rep: Reputation: Disabled
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

Last edited by wchouser3; 10-26-2015 at 01:38 AM. Reason: added a hyperlink
 
Old 10-26-2015, 03:24 AM   #3
beanaroo
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-26-2015, 01:46 PM   #4
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
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"
 
Old 10-26-2015, 01:49 PM   #5
debguy
Member
 
Registered: Oct 2014
Location: U.S.A.
Distribution: mixed, mostly debian slackare today
Posts: 207

Rep: Reputation: 19
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.
 
Old 10-26-2015, 05:36 PM   #6
beanaroo
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
???

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


Reply

Tags
gtk3


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
KDE, GTK, QT theming insanity slack_ Linux - Desktop 0 02-04-2015 09:45 AM
LXer: Making GTK3 themes – Part 2: The gtk.css and gtk-widgets.css file LXer Syndicated Linux News 0 07-24-2012 01:50 PM
GTK Theming Help xpromisex Linux - General 1 05-05-2006 10:33 AM
GTK Theming issues fr0zen Linux - Software 0 09-27-2004 07:57 PM
GTK Theming-Works in 2.0, not in 1.2 unworthy Linux - Software 0 09-24-2003 04:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration