changing background color in LV2::GUI



Hello

I'd like to change the background color of a window, but I encounter some issues.

FYI, I'm programming a LV2 (audio plugin) GUI by subclassing LV2::GUI class (from lv2-c++-tools).
This specificity makes that I subclass directly a widget, and not a window, which is instanciated by the host
LV2::GUI subclasses Gtk::HBox for convenience.

I've tried a few things (all from the HBox subclass), hoping in some way the bg color will propagate to all children

    modify_bg(Gtk::STATE_ACTIVE, Gdk::Color("bd7b2b"));
    modify_bg(Gtk::STATE_NORMAL, Gdk::Color("bd7b2b"));
    ... // so on for each state to be sure not missing something
-> no visible effect

    get_style()->set_bg(Gtk::STATE_ACTIVE, Gdk::Color("bd7b2b"));
    ...
-> no visible effect

    get_toplevel()->get_style()->set_bg(Gtk::STATE_ACTIVE, Gdk::Color("bd7b2b"));
    ...
-> no visible effect

    get_window()->set_background(Gdk::Color("bd7b2b"));
-> segmentation fault in constructor, no visible effect in "on_realize()"

I'm running this plugin in Ingen

Thanks for your help
Rémi
   
   
   


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