you can just type any property name though. the argument is just a string.
the symbols in the header are just macros and not exhaustive.
glad to help. have fun!
On Wed, 19 Feb 2020, 11:23 Mohith Manoj via gtkmm-list, <
gtkmm-list@gnome.org> wrote:
> viola... that gets the wheel rolling.
>
>
viola... that gets the wheel rolling.
*gtk_style_context_get* works. However, there are only 10 style properties
defined in gtkstylecontext.h that we can retrieve this way and not all the
style properties listed in Gtk-Inspector. For example there is a single
definition for border radius as,
-- Forwarded message -
From: Daniel Boles
Date: Wed, 19 Feb 2020, 10:31
Subject: Re: Fetching gtkmm custom css style properties
To: Mohith Manoj
Oh, sorry.
What you want is not Object.get_property but rather StyleContext.get, but
the latter is not wrapped in gtkmm yet.
So you
Sorry I felt a bit dumb at this point, so I though I'll try all
combinations. Following code is executed on a button press from a custom
widget derived from Gtk::ToggleButton.
int nValue;
Glib::RefPtr refStyleContext = get_style_context();
refStyleContext->get_property("color",
it doesnt work because those are CSS properties, which are not widget style
properties.
use get_property("css-prop-name", dst_value)
On Wed, 19 Feb 2020, 09:51 Mohith Manoj via gtkmm-list, <
gtkmm-list@gnome.org> wrote:
> Of course... get_color() works as we have seen in the example code. But
Of course... get_color() works as we have seen in the example code. But to
get a property like 'border-top-left-radius' or 'border-right-color' there
is no direct API and we are dependent on something like
Gtk::StyleContext::get_style_property, but since this doesn't work we have
our hunting hat
color is a normal css property, not a widget style property. use the right
api for that. there is get_property() and iirc maybe even get_color().
don't use widget style properties in new code because they are removed in
gtk 4.
___
gtkmm-list mailing
Hello Sir,
Can you send me the sample examples for the get_style_properties_value API
in gtkmm3.0.I had done R and D about this API but I got only the class
references and one line explanation.
Thanks and Regards
Gowthami
--
--
*Please consider the Environment before printing this