diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-09-07 08:35:09 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-09-07 08:35:09 +0200 |
commit | 2a5cb6f62159e345441046028ff70bc9e2906b28 (patch) | |
tree | 1345068547d9e4dc08c818751600e0e216960673 | |
parent | 7c1ecb470773843d72a49adb462becb05af299df (diff) |
Alias 'color' property name to 'text-color'
-rw-r--r-- | lexer/theme-lexer.l | 2 | ||||
-rw-r--r-- | source/theme.c | 2 | ||||
-rw-r--r-- | source/widgets/textbox.c | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/lexer/theme-lexer.l b/lexer/theme-lexer.l index 1eb47aec..5ea7e753 100644 --- a/lexer/theme-lexer.l +++ b/lexer/theme-lexer.l @@ -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;} diff --git a/source/theme.c b/source/theme.c index a335db10..10001c0f 100644 --- a/source/theme.c +++ b/source/theme.c @@ -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; diff --git a/source/widgets/textbox.c b/source/widgets/textbox.c index 26883fda..57856b1c 100644 --- a/source/widgets/textbox.c +++ b/source/widgets/textbox.c @@ -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. |