diff options
author | waker <wakeroid@gmail.com> | 2011-03-23 21:18:26 +0100 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-03-23 21:18:26 +0100 |
commit | 4a0f3f780b88e3db50acc1fb4750657a79342eb7 (patch) | |
tree | aaf777103de671ead61ecafa84964c83e6f861ea /plugins/gtkui/ddbtabstrip.c | |
parent | 103185d504ad26cde11889618722e6e7881384d0 (diff) |
customizable tabstrip text color
Diffstat (limited to 'plugins/gtkui/ddbtabstrip.c')
-rw-r--r-- | plugins/gtkui/ddbtabstrip.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/plugins/gtkui/ddbtabstrip.c b/plugins/gtkui/ddbtabstrip.c index 435b6946..325f7a25 100644 --- a/plugins/gtkui/ddbtabstrip.c +++ b/plugins/gtkui/ddbtabstrip.c @@ -520,8 +520,9 @@ tabstrip_render (DdbTabStrip *ts) { ddb_tabstrip_draw_tab (widget, backbuf, idx == tab_selected, x, y, w, h); char tab_title[100]; plt_get_title_wrapper (idx, tab_title, sizeof (tab_title)); - GdkColor *color = &widget->style->text[GTK_STATE_NORMAL]; - float fg[3] = {(float)color->red/0xffff, (float)color->green/0xffff, (float)color->blue/0xffff}; + GdkColor color; + gtkui_get_tabstrip_text_color (&color); + float fg[3] = {(float)color.red/0xffff, (float)color.green/0xffff, (float)color.blue/0xffff}; draw_set_fg_color (fg); draw_text (x + text_left_padding, y + h/2 - draw_get_font_size()/2 + text_vert_offset, w, 0, tab_title); } @@ -547,8 +548,9 @@ tabstrip_render (DdbTabStrip *ts) { ddb_tabstrip_draw_tab (widget, backbuf, 1, x, y, w, h); char tab_title[100]; plt_get_title_wrapper (idx, tab_title, sizeof (tab_title)); - GdkColor *color = &widget->style->text[GTK_STATE_NORMAL]; - float fg[3] = {(float)color->red/0xffff, (float)color->green/0xffff, (float)color->blue/0xffff}; + GdkColor color; + gtkui_get_tabstrip_text_color (&color); + float fg[3] = {(float)color.red/0xffff, (float)color.green/0xffff, (float)color.blue/0xffff}; draw_set_fg_color (fg); draw_text (x + text_left_padding, y + h/2 - draw_get_font_size()/2 + text_vert_offset, w, 0, tab_title); } @@ -568,8 +570,9 @@ tabstrip_render (DdbTabStrip *ts) { ddb_tabstrip_draw_tab (widget, backbuf, 1, x, y, w, h); char tab_title[100]; plt_get_title_wrapper (idx, tab_title, sizeof (tab_title)); - GdkColor *color = &widget->style->text[GTK_STATE_NORMAL]; - float fg[3] = {(float)color->red/0xffff, (float)color->green/0xffff, (float)color->blue/0xffff}; + GdkColor color; + gtkui_get_tabstrip_text_color (&color); + float fg[3] = {(float)color.red/0xffff, (float)color.green/0xffff, (float)color.blue/0xffff}; draw_set_fg_color (fg); draw_text (x + text_left_padding, y + h/2 - draw_get_font_size()/2 + text_vert_offset, w, 0, tab_title); } |