How to use gtk_render_handle on patterned widget?
- From: Peter Hurley <peter hurleysoftware com>
- To: "gtk-devel-list gnome org" <gtk-devel-list gnome org>
- Subject: How to use gtk_render_handle on patterned widget?
- Date: Mon, 23 Jan 2012 16:13:56 -0500
I'm hoping to get some clarification regarding the semantics of
gtk_render_handle. The stock theming engine renders the handle centered
within the rectangle parameters (@x,y width x height). Unfortunately,
it also wipes the background with the pattern scaled to width x height.
What's the correct method to render the handle on, for example, the left
side of a widget if the existing background is patterned?
The approach gnome-panel takes is:
gtk_render_handle (context, cr,
Unfortunately, this often means that the handle is rendered outside the
clip and not visible.
Without changing the theming engine, ISTM that the only way to draw a
handle within a subarea of a patterned widget is to:
set background to the widget pattern
construct new subpattern from base widget pattern
set background to the new subpattern
Is this correct?
] [Thread Prev