Custom widget background color
- From: Jean Brefort <jean brefort normalesup org>
- To: Gnome List <gtk-list gnome org>
- Subject: Custom widget background color
- Date: Thu, 17 May 2012 09:31:41 +0200
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]