summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-09-07 08:35:09 +0200
committerDave Davenport <qball@gmpclient.org>2017-09-07 08:35:09 +0200
commit2a5cb6f62159e345441046028ff70bc9e2906b28 (patch)
tree1345068547d9e4dc08c818751600e0e216960673
parent7c1ecb470773843d72a49adb462becb05af299df (diff)
Alias 'color' property name to 'text-color'
-rw-r--r--lexer/theme-lexer.l2
-rw-r--r--source/theme.c2
-rw-r--r--source/widgets/textbox.c2
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.