Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can I theme GTK+ widgets without Gnome installed?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Fri Jun 14, 2002 11:40 am    Post subject: Can I theme GTK+ widgets without Gnome installed? Reply with quote

Hi, I know comparatively little about Gnome (haven't used it since RedHat 6.0). But I run a fair few (great) GTK+ programs. I really find the default widget set ... well ... ugly. Perhaps not ugly as such, but pretty unattractive and tacky. I know GTK+ widgets are themeable so I have two questions:

1. How? Must I have Gnome fully installed?
2. Can it be done for GTK+ 1.x or only 2.x?

Thanks!
Back to top
View user's profile Send private message
slik
n00b
n00b


Joined: 18 Apr 2002
Posts: 48
Location: Alberta, Canada

PostPosted: Fri Jun 14, 2002 7:30 pm    Post subject: Re: Can I theme GTK+ widgets without Gnome installed? Reply with quote

kerframil wrote:

1. How? Must I have Gnome fully installed?
2. Can it be done for GTK+ 1.x or only 2.x?


1. you don't need gnome fully installed
2. yes it can be done with 1.x

in your home directory, create the file .gtkrc
Code:
include "/usr/share/themes/themename/gtk/gtkrc"
style "user-font"
{
fontset="-*-*-*-*-*-*-*-*-*-*-*-*-*-*"
}
widget_class "*" style "user-font"


replace fontset with what you want for default font, you can grab this line from xfontsel

browse for a theme you like here or here.
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Jun 18, 2002 5:24 pm    Post subject: Reply with quote

Nice one, slik ... :-)
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Jun 18, 2002 6:24 pm    Post subject: Arrrghh! No luck ... Reply with quote

Sorry if I'm being a bit lame, but I tried that method to no avail. OK, I thought, lets look for some documentation - I managed to find a tutorial which indicated that you can simply copy the gtkrc file from the theme sub-directory to your ~/.gtkrc file (btw, it said you need gtk-engines so I emerged that). I had partial success using this approach, but none of the pixmaps would work. I have got jpglib, imlib and libpng installed. You could see other aspects of the theme being applied, but no buttons, scrollbars and so on. I tried running a GTK app from the console to see what was happenning (sylpheed). There were lots of errors as such:
Code:
Gtk-WARNING **: Unable to locate image file in pixmap_path: "button5.png" line 1105

Gtk-WARNING **: Unable to locate image file in pixmap_path: "button5.png" line 1114


etc etc etc ....

<deep breath> I then followed the advice given and edited the resource file and added a line at the top of the file (in this case for the AquaLiteBlue theme):
Code:
pixmap_path "/usr/share/themes/AquaLiteBlue/gtk/"


Same problem! I then uncommented this line to ensure it was looking in the right place for the engine libraries:
Code:
module_path "/usr/lib/gtk/themes/engines"


Still nothing! :-( Any idea what gives?
Back to top
View user's profile Send private message
474
l33t
l33t


Joined: 19 Apr 2002
Posts: 714

PostPosted: Tue Jun 18, 2002 6:41 pm    Post subject: Progress at last Reply with quote

Great! I got it working (without errors) by removing the pixmap_path line that I had added and changing the uncommented module_path line like this:
Code:
module_path "/usr/lib/gtk/themes/engines/lib

Now I'll have a look at your technique. Funny though - app-misc/gtk-theme-switch does not work at all ... pity, because it would be nice to preview the themes.

EDIT: spoke way too soon! It only worked if I ran sylpheed from a console when I was in the directory that had the pixmaps in it ... this is getting really frustrating now. Advice is really welcome ...
Back to top
View user's profile Send private message
slik
n00b
n00b


Joined: 18 Apr 2002
Posts: 48
Location: Alberta, Canada

PostPosted: Wed Jun 19, 2002 5:36 pm    Post subject: Re: Progress at last Reply with quote

You need x11-libs/gtk-engines-0.12-r2 installed, do you have that? gtk-engines-1.9.0 is for gtk+2 Other than that, I'm not sure, I did install x11-libs/old-gtk-themes too though (hacked up so I could download them)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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