Re: Why GTK+ ignore, that someone want's to create own widget ?!



Hi;

On 13 December 2016 at 05:33, Ondrej Tuma <konference webjet cz> wrote:
At the moment, i just to get default widget border color. But, the
gtk_style_context_get_border_color is deprecated... and i should to use
gtk_render_frame. Please tell me how can i use gtk_render_frame to get
border color?! How?

You don't "get the border color" because there's no such thing as a
border or background color.

CSS, which is used to represent the rendering operations, has a stack
of background and border images, which are blended with colors. Asking
for a single color does not make sense.

You need to call gtk_render_frame() and gtk_render_background() to
*render* the border and background. Then you set up what you want to
render using CSS style classes and call gtk_style_context_add_class()
to add the matching classes to your widget.

Every widget you see is the result of this process.

What GTK do is putting obstacles in the way of creating more complex
application. But yes, sometimes, we need special widgets, with special
using :-(

GTK does not put obstacles anywhere: it provides you with a very rich
and powerful way to describe the rendering process and its final
outcome using a standardised API called "CSS" instead of using only a
C API.

Ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]