Styling custom gtk widgets
- From: ax487 <ax487 gmx de>
- To: gtk-list gnome org
- Subject: Styling custom gtk widgets
- Date: Fri, 29 Aug 2014 22:37:38 +0200
Hello all,
I have some questions regarding the CSS styling system. I have given a
canvas with certain pages on top of it. I want to draw a frame around
each of the pages. I use gtk_render_frame for this. However, this leads
to a couple of complications:
1. I noticed that in the default setting nothing is rendered at all.
This seems to be due to the fact that the border style is not defined. I
have to add a class to the style context using for example
"gtk_style_context_add_class(context, classname)". I am unclear about
the class to use for this. It should be such that the frame is visible
and there is a clear distinction between focused and unfocused. Is there
a suitable class?
2. Assume that I want to have the possibility to modify the style using
a CSS file. Can I achieve an "override" effect in the CSS file (like this)?
MyWidget {
// command to use the same style as that of some other class
modification: value;
}
3. The pages I want to display are rectangles, however in general the
frames used by standard themes might have a border-radius. This means
that if I draw the frame over the page then the edges of the page
overlap. Is there some way of clipping the cairo_t* according to the
rendered frame?
I would be interested in something which integrates well with different
existing themes. Am I going about this in the right way?
ax487
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]