GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Aug 30, 2014 4:13 pm

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: GTK2 and themes
PostPosted: Thu Sep 29, 2005 7:12 pm 
Offline
Familiar Face

Joined: Thu Sep 29, 2005 7:05 pm
Posts: 5
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

_________________
Et si fellitur de genu pugnat


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 1:00 am 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
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

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 3:39 pm 
Offline
Familiar Face

Joined: Thu Sep 29, 2005 7:05 pm
Posts: 5
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?

_________________
Et si fellitur de genu pugnat


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 5:36 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
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.

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 30, 2005 7:14 pm 
Offline
Familiar Face

Joined: Thu Sep 29, 2005 7:05 pm
Posts: 5
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.

_________________
Et si fellitur de genu pugnat


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 2:51 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 12:07 am
Posts: 563
Location: Portland, OR USA
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.

_________________
Micah Carrick - Forum Administrator
http://www.micahcarrick.com


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 01, 2005 3:06 pm 
Offline
Never Seen the Sunlight

Joined: Wed Sep 21, 2005 3:07 am
Posts: 384
Location: Fairfax, Virginia
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...

_________________
Andrew Krause

Foundations of GTK+ Development: Buy now for only $31.49!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 03, 2005 3:27 pm 
Offline
Familiar Face

Joined: Thu Sep 29, 2005 7:05 pm
Posts: 5
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

_________________
Et si fellitur de genu pugnat


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group