GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Aug 01, 2014 1:44 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: background image to GTK window
PostPosted: Thu Jan 05, 2012 9:16 pm 
Offline
GTK+ Geek

Joined: Sat Sep 03, 2011 6:36 pm
Posts: 94
I want to add a background image to a window (like personas in firefox where you can customise the application) sth like that.Is there any way of doing so ?i found this guide but its in python and im coding in GTK+ in c http://islascruz.org/html/index.php/blo ... tion..html


EDIT: I came across these
http://developer.gnome.org/gdk/stable/g ... ack-pixmap
http://developer.gnome.org/gdk/stable/g ... background

can someone provide me with some very simple examples of how they work?


Top
 Profile  
 
 Post subject: Re: background image to GTK window
PostPosted: Sat Jan 07, 2012 5:19 am 
Offline
GTK+ Guru

Joined: Fri Mar 25, 2011 5:16 pm
Posts: 177
Location: USA
With gtk3 and CSS you can do it like this:
http://www.gtkforums.com/viewtopic.php?f=3&t=988&p=195278&hilit=GTK+with+CSS%3A+Background+images#p195278


Last edited by zerohour on Fri Jun 08, 2012 7:00 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: background image to GTK window
PostPosted: Sat Jan 07, 2012 11:08 am 
Offline
GTK+ Geek

Joined: Sat Sep 03, 2011 6:36 pm
Posts: 94
Cheeers! Is there any way I can also adjust the opacity of the elements inside the window (like menubar) to look transparent so that the background image is visible? Thanks!


Top
 Profile  
 
 Post subject: Re: background image to GTK window
PostPosted: Sun Jan 08, 2012 9:24 pm 
Offline
GTK+ Guru

Joined: Fri Mar 25, 2011 5:16 pm
Posts: 177
Location: USA
You'll probably have to use themes to get something like that. Sorry I can't help but See:
Quote:
GtkThemingEngines can register their own, engine-specific style properties with the function gtk_theming_engine_register_property().
...
Example 39. Using engine-specific style properties

http://developer.gnome.org/gtk3/3.4/GtkCssProvider.html


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group