Alias 'color' property name to 'text-color'

This commit is contained in:
Dave Davenport 2017-09-07 08:35:09 +02:00
parent 7c1ecb4707
commit 2a5cb6f621
3 changed files with 4 additions and 2 deletions

View file

@ -395,6 +395,8 @@ if ( queue == NULL ){
<NAMESTR>\.|{WHITESPACE} { return T_NSEP; }
<NAMESTR>,{WHITESPACE}* { return T_SSEP; }
/* Alias color to text-color */
<SECTION>"color" { yylval->sval = g_strdup("text-color"); return T_PROP_NAME;}
<SECTION>{WORD} { yylval->sval = g_strdup(yytext); return T_PROP_NAME;}
<NAMESTR>{WORD} { yylval->sval = g_strdup(yytext); return T_NAME_ELEMENT;}

View file

@ -485,7 +485,7 @@ Property *rofi_theme_find_property ( ThemeWidget *widget, PropertyType type, con
ThemeWidget *rofi_theme_find_widget ( const char *name, const char *state, gboolean exact )
{
// First find exact match based on name.
ThemeWidget *widget = rofi_theme_find ( rofi_theme, name, FALSE );
ThemeWidget *widget = rofi_theme_find_single ( rofi_theme, name );
widget = rofi_theme_find ( widget, state, exact );
return widget;

View file

@ -442,7 +442,7 @@ static void textbox_draw ( widget *wid, cairo_t *draw )
// TODO check if this is still needed after flatning.
cairo_set_operator ( draw, CAIRO_OPERATOR_OVER );
cairo_set_source_rgb ( draw, 0.0, 0.0, 0.0 );
rofi_theme_get_color ( WIDGET ( tb ), "color", draw );
rofi_theme_get_color ( WIDGET ( tb ), "text-color", draw );
// draw the cursor
if ( tb->flags & TB_EDITABLE && tb->blink ) {
// We want to place the cursor based on the text shown.