tags:

views:

61

answers:

1

Hi, I would like to change the image of GTK Scrollbar, i.e) I want to remove the standard looking scrollbar, and add my resources to it.

I dont mind touching gtk code.

I am sure that GTK will maintain all the images as a resources,

Can any one please locate me, where to change the images?

Thanks in advance Dinesh P

+1  A: 

The scrollbars aren't drawn in GTK; the theme engine is responsible for drawing them. In all themes that I know of, they are not drawn using image resources, but instead using GDK or Cairo.

See for example this code from the Clearlooks theme: http://git.gnome.org/browse/gtk-engines/tree/engines/clearlooks/src/clearlooks_draw_glossy.c (line 915, function clearlooks_glossy_draw_scrollbar_stepper())

If you want to use images, you will have to change a theme engine or write your own.

<standard-lecture> It's generally frowned upon to do this sort of thing in GTK; the toolkit is all about usability. Users with particular needs may have configured their themes in a particular way, for example to be compatible with a screen reader, and drawing your own customized stuff may interfere with that. At the very least, you will piss people off by breaking their desktop themes. As an application developer, you should build your application out of the widgets that GTK and other libraries provide, and the user should be free to decide how it looks on their own desktop. </standard-lecture>

ptomato
+1 for the frowning, it's frustrating with people who seem to focus so much on the per-pixel look of their GTK+ apps.
unwind
Hi, Actually the thing I am working on, is not for Desktop. This is for some embedded devices, which has enough RAM to support gtk+. BTW this image change is for not a sigle APP. This change we wanted for the entire framework. Thanks ptomato for directing me towards the theme engine.
Dinesh