mirror of
https://github.com/lbonn/rofi
synced 2024-11-27 06:10:30 +00:00
Make 'text' override foreground color for rendering text
This commit is contained in:
parent
8fe5ea648a
commit
8c0c43952d
2 changed files with 3 additions and 12 deletions
|
@ -155,6 +155,7 @@ The following properties are currently supports:
|
|||
* textbox:
|
||||
* background: color
|
||||
* foreground: color
|
||||
* text: The text color to use (falls back to foreground if not set)
|
||||
|
||||
* listview:
|
||||
* columns: integer
|
||||
|
|
|
@ -362,11 +362,9 @@ static void texbox_update ( textbox *tb )
|
|||
}
|
||||
y = widget_padding_get_top ( WIDGET (tb) ) + ( pango_font_metrics_get_ascent ( p_metrics ) - pango_layout_get_baseline ( tb->layout ) ) / PANGO_SCALE;
|
||||
|
||||
// Set background transparency
|
||||
//cairo_set_source_rgba ( tb->main_draw, 0,0,0,0.0);
|
||||
//cairo_paint ( tb->main_draw );
|
||||
|
||||
rofi_theme_get_color ( WIDGET ( tb ), "foreground", tb->main_draw);
|
||||
// Text
|
||||
rofi_theme_get_color ( WIDGET ( tb ), "text", tb->main_draw);
|
||||
// draw the cursor
|
||||
if ( tb->flags & TB_EDITABLE && tb->blink ) {
|
||||
cairo_rectangle ( tb->main_draw, x + cursor_x, y+cursor_y, cursor_width, cursor_height);
|
||||
|
@ -380,14 +378,6 @@ static void texbox_update ( textbox *tb )
|
|||
pango_cairo_show_layout ( tb->main_draw, tb->layout );
|
||||
|
||||
if ( ( tb->flags & TB_INDICATOR ) == TB_INDICATOR && ( tb->tbft & ( SELECTED ) ) ) {
|
||||
/*
|
||||
if ( ( tb->tbft & SELECTED ) == SELECTED ) {
|
||||
cairo_set_source_rgba ( tb->main_draw, col.red, col.green, col.blue, col.alpha );
|
||||
}
|
||||
else if ( ( tb->tbft & HIGHLIGHT ) == HIGHLIGHT ) {
|
||||
cairo_set_source_rgba ( tb->main_draw, col.red, col.green, col.blue, col.alpha * 0.2 );
|
||||
}
|
||||
*/
|
||||
|
||||
cairo_arc ( tb->main_draw, DOT_OFFSET / 2.0, tb->widget.h / 2.0, 2.0, 0, 2.0 * M_PI );
|
||||
cairo_fill ( tb->main_draw );
|
||||
|
|
Loading…
Reference in a new issue