GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GTK2 and themes

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> General GTK+ Discussion
Author Message
Little Idea
Familiar Face


Joined: 29 Sep 2005
Posts: 5

PostPosted: Thu Sep 29, 2005 7:12 pm    Post subject: GTK2 and themes Reply with quote

I'm trying to get up to speed with GTK/glade.

I'm particularly interested in any tutorials or examples that explain how to use and/or create themes.

I've been putting google through some paces and I'm a little bit confused by how themes crossover between Gnome and GTK (for example, from www.gtk.org, clicking on Themes takes you to art.gnome.org)

Can someone please provide an example of how to apply themes or point me to a reference. . .

Thanks
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 514
Location: Portland, OR USA

PostPosted: Fri Sep 30, 2005 1:00 am    Post subject: Reply with quote

In addition to googling "GTK" and "theme", look up "GTK+ engines", "metacity", "clearlooks" for further information. Check out...

http://en.wikipedia.org/wiki/Metacity
http://developer.gnome.org/doc/tutorials/metacity/metacity-themes.html
http://oceanic.wsisiz.edu.pl/~slabosz/wordpress/?page_id=3
http://gnome-look.org/index.php?xcontentmode=101
Back to top
Little Idea
Familiar Face


Joined: 29 Sep 2005
Posts: 5

PostPosted: Fri Sep 30, 2005 3:39 pm    Post subject: Reply with quote

Thanks Micah but let me ask a more specific question.

Let's say I have a gtk2 ui on an existing application built with glade2 and I want to apply a theme, maybe H20-gtk2.

What do I need to do?
Back to top
openldev
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 385
Location: Fairfax, Virginia

PostPosted: Fri Sep 30, 2005 5:36 pm    Post subject: Reply with quote

Themes are handled by the window manager, & you really shouldn't mess with them in a specific application. People have different aesthetic needs & you would be messing with them by changing your application's theme.
Back to top
Little Idea
Familiar Face


Joined: 29 Sep 2005
Posts: 5

PostPosted: Fri Sep 30, 2005 7:14 pm    Post subject: Reply with quote

I appreciate your concern, but that is not the question.

What if I have needs to mess with people's theme expectations? What about my needs?

I want to be able to effect GTK look and feel at the application level, if someone can point me in the right direction, please do.
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 514
Location: Portland, OR USA

PostPosted: Sat Oct 01, 2005 2:51 pm    Post subject: Reply with quote

It's fairly common knowledge that typical in application development you would now want to explicitly control the appearance of you application, however, if you're writing an application for yourself, or for a small audience in which the environment and users are all known, then certainly you could want to explicitly apply a theme or control the appearence-- as long as you go in to it knowing that it is generally considered a "no-no". For example, although it was on Windows, I broke the same rules when I created an application which was a GUI for a circuit I built which charged 6 PDA batteries simultaneously. The GUI was simply 800x600 and I explicity controlled all aesthetic aspects of the application and the end user had no say. It was used on one system at one location for a limited period of time. It looked very pretty and I did not need to worry about resizing, monitor resolutions, fonts, etc.

Are you trying to specify the theme for all of Gnome or GTK or for your specific application only?

So, personally I don't know how to do what you are asking and I suspect that there won't be a lot of information on doing it for the reasons mentioned above. I would also be curious as to how one would go about doing it. Somehow I imagine it's not as easy as one would think.
Back to top
openldev
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 385
Location: Fairfax, Virginia

PostPosted: Sat Oct 01, 2005 3:06 pm    Post subject: Reply with quote

Well, there are ways, but you have to override GTK API errors that are thrown when you try and include internal GTK+ files. I would recommend trying to find where in the GTK+ source code they apply themes...
Back to top
Little Idea
Familiar Face


Joined: 29 Sep 2005
Posts: 5

PostPosted: Mon Oct 03, 2005 3:27 pm    Post subject: Reply with quote

I want to control how GTK looks on an application by application basis.

It is a long story but the application will be running on Linux and displayed on windows XP through X forwarding.
There is no Gnome involved.

I haven't got an implementation running yet, but I believe all the needed information is available:

http://www.lilug.org/special/presentation.gtk.html

http://www.gtk.org/~otaylor/gtk/2.0/theme-engines.html
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> General GTK+ Discussion All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP