Re: Fetching gtkmm custom css style properties



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<Gtk::StyleContext> refStyleContext = get_style_context();

      refStyleContext->get_property("color", nValue);
      refStyleContext->get_property("css-color", nValue);

      refStyleContext->get_style_property("color", nValue);
      refStyleContext->get_style_property("css-color", nValue);

      get_property("color", nValue);
      get_property("css-color", nValue);

All six lines threw warnings as below.

(TV_UI:21972): GLib-GObject-WARNING **: 15:49:20.480: g_object_get_is_valid_property: object class 'GtkStyleContext' has no property named 'color'

(TV_UI:21972): GLib-GObject-WARNING **: 15:49:20.480: g_object_get_is_valid_property: object class 'GtkStyleContext' has no property named 'css-color'

(TV_UI:21972): Gtk-WARNING **: 15:49:20.480: ../../../../gtk/gtkstylecontext.c:1796: widget class 'gtkmm__GtkToggleButton' has no style property named 'color'

(TV_UI:21972): Gtk-WARNING **: 15:49:20.480: ../../../../gtk/gtkstylecontext.c:1796: widget class 'gtkmm__GtkToggleButton' has no style property named 'css-color'

(TV_UI:21972): GLib-GObject-WARNING **: 15:49:20.480: g_object_get_is_valid_property: object class 'gtkmm__GtkToggleButton' has no property named 'color'

(TV_UI:21972): GLib-GObject-WARNING **: 15:49:20.480: g_object_get_is_valid_property: object class 'gtkmm__GtkToggleButton' has no property named 'css-color'






Please consider the Environment before printing this e-mail.

The information contained in this message (including any attachments) is confidential and may be privileged or otherwise protected from disclosure.  If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person.  If you have received this transmission in error, please notify the sender immediately by return e-mail and permanently delete this message and any attachments from your system.  Any dissemination, use, review, distribution, printing or copying of this message in whole or in part is strictly prohibited.  Please note that e-mails are susceptible to change.
 
SKANRAY(including its group of companies) shall not be liable for any omission or error in the message, improper or incomplete transmission of the information contained in this communication or for any delay in its receipt or damage to your system.  SKANRAY(or its group of companies) does not guarantee that the integrity of this communication has been maintained or that this communication is free of viruses, interceptions or interference.


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