Custom widget background color



Hi,

I wrote a custom widget for which some regions should appear selected.
I'm using Ubuntu 12.04, and the theme contains the following:

@define-color bg_color #f2f1f0;
@define-color selected_bg_color #f07746;
@define-color selected_fg_color #ffffff;

* {
    /* inherit the color from parent by default */
    color: inherit;
    background-color: @bg_color;
}

*:selected,
*:selected:focused {
    background-color: alpha (@selected_bg_color, 0.9);

    color: @selected_fg_color;
}


Using:
gtk_style_context_get_background_color(ctxt, GTK_STATE_FLAG_SELECTED, &color);
returns white, not the expected f07746. What am I missing?

Thanks,
Jean



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