Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Modifying GTK colours
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
bob doe
Apprentice
Apprentice


Joined: 11 Jun 2007
Posts: 207

PostPosted: Sun Jul 20, 2008 2:26 pm    Post subject: Modifying GTK colours Reply with quote

I have several applications which (Im assuming) are all made from GTK. That is, Firefox2, Pidgin, Wireshark, PuTTY, nmapfe, and so on. (I say this because they all have the gtk USE flag)

Im not a fan of the default gray that has been predominant in GUIs for far too long. I'd like to change the colours to a style more suited to my needs. But between searching the forums here, Google, and the GTK website docs, I've pretty much found nothing.

Anyone care to help? :)
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3789
Location: sleeping in the bathtub

PostPosted: Sun Jul 20, 2008 2:59 pm    Post subject: Reply with quote

The colours of gtk+ apps are completely defined by the themes, just go searching for different themes on freshmeat or art.gnome.org or similar.

Just drop the unpacked theme into ~/.themes, or /usr/share/themes for use by any user, and (presuming you're not using gnome or xfce) emerge gtk-theme-switch or gtk-chtheme to switch themes, and/or manually edit /etc/gtk-2.0/gtkrc to change the default theme for all users.

I believe some svg themes actually allow you to specify your own colours, IIRC murrine does at least.
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Sun Jul 20, 2008 4:33 pm    Post subject: Reply with quote

Worth checking out: http://gnomecc.sourceforge.net/
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
RedSquirrel
Guru
Guru


Joined: 22 Apr 2008
Posts: 336

PostPosted: Sun Jul 20, 2008 8:33 pm    Post subject: Reply with quote

If you don't specify a different GTK+ theme, you get the default which is "Raleigh" (often referred to as "that ugly grey theme").

There are several GTK+ engines (with sample themes) available in Portage. Just do a search for "gtk-engines". It's often sufficient to use the themes that are supplied with the engines (without modifying the colours). I've been using nimbus (gtk-engines-nimbus) for the past couple of months.

You can change the colours by editing the gtkrc file under /usr/share/themes/theme_name or as a local copy under ~/.themes/theme_name. The heading Styles on the following page might help:

http://library.gnome.org/devel/gtk/stable/gtk-Resource-Files.html
Back to top
View user's profile Send private message
Miranda
n00b
n00b


Joined: 11 Jul 2008
Posts: 4

PostPosted: Mon Jul 21, 2008 8:45 am    Post subject: Reply with quote

Gnome and GTK+ themes nowadays, just as KDE and Qt, allow you to conveniently change the color scheme (for most themes), either using gnome-appearance-properties or by editing /desktop/gnome/interface/gtk_color_scheme in gconf-editor.

If your editing gtk_color_scheme directly here is an example:
Code:
fg_color:#000000000000
bg_color:#f2f2f1f1f2f2
text_color:#000000000000
base_color:#ffffffffffff
selected_fg_color:#ffffffffffff
selected_bg_color:#ca223e2fffff
tooltip_fg_color:#000000000000
tooltip_bg_color:#000000000000


Read more here:
http://live.gnome.org/GnomeArt/Tutorials/GtkThemes/SymbolicColors
Back to top
View user's profile Send private message
bob doe
Apprentice
Apprentice


Joined: 11 Jun 2007
Posts: 207

PostPosted: Mon Jul 21, 2008 2:13 pm    Post subject: Reply with quote

I've looked at the links, I guess one thing I should have specified is that Im NOT using Gnome. Im running Fluxbox + a few GTK apps. The most bloated of which is FF.
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Mon Jul 21, 2008 2:39 pm    Post subject: Reply with quote

I'm having a similar problem, I used gtk-qt-engine to make the gtk apps look the same as my kde apps. Now I switched to kde4 and still have the wrong (green) colors from the settings there. I can't get kcontrol to work again, so I don't know where to change those colors... I even tried to delete the gtkrc files and those from the gtk-qt-engine but without success.
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
Miranda
n00b
n00b


Joined: 11 Jul 2008
Posts: 4

PostPosted: Tue Jul 22, 2008 6:50 am    Post subject: Reply with quote

If you use kde4 install gtk-engines-qt4 and gtk-engines-kde4. Use systemsettings application in kde4 or set gtk-theme-name = "Qt4" in ~/.gtkrc-2.0.

If you do not use Gnome or KDE4, my preferable solution is to use the gnome tools to set options and run /usr/libexec/gnome-settings-daemon at startup.
You can also set
Code:
gtk-theme-name = "name of theme"
gtk-font-name = "name of font"

in ~/.gtkrc-2.0 and edit gtk_color_scheme at the top of /usr/share/themes/name_of_theme/gtk-2.0/gtkrc (or ~/themes/name_of_theme/gtk-2.0/gtkrc).
Back to top
View user's profile Send private message
Phlogiston
Veteran
Veteran


Joined: 27 Jan 2004
Posts: 1925
Location: Europe, Swizerland

PostPosted: Tue Jul 22, 2008 8:24 am    Post subject: Reply with quote

Miranda wrote:
If you use kde4 install gtk-engines-qt4 and gtk-engines-kde4. Use systemsettings application in kde4 or set gtk-theme-name = "Qt4" in ~/.gtkrc-2.0.

If you do not use Gnome or KDE4, my preferable solution is to use the gnome tools to set options and run /usr/libexec/gnome-settings-daemon at startup.
You can also set
Code:
gtk-theme-name = "name of theme"
gtk-font-name = "name of font"

in ~/.gtkrc-2.0 and edit gtk_color_scheme at the top of /usr/share/themes/name_of_theme/gtk-2.0/gtkrc (or ~/themes/name_of_theme/gtk-2.0/gtkrc).


The new version of gtk-engines-qt4 is very buggy and unusable.
_________________
Workstation: 5.1 SurroundSound, LIRC remote control; Laptop [IBM-T43]: patched sources, s2disk/ram, fingerprint sensor
Back to top
View user's profile Send private message
D-EJ915
n00b
n00b


Joined: 24 Oct 2007
Posts: 4
Location: Virginia Beach

PostPosted: Thu Jul 24, 2008 6:20 pm    Post subject: Reply with quote

bob doe wrote:
I've looked at the links, I guess one thing I should have specified is that Im NOT using Gnome. Im running Fluxbox + a few GTK apps. The most bloated of which is FF.
When I want to change the colours I have to end up modifying the actual gtkrc file, it's a pain but if you get them right you won't be changing them again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum