diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-12-13 00:09:51 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-12-13 00:09:51 +0100 |
commit | 38035568f375c701d49658adbe9c7d632d584b31 (patch) | |
tree | 61462ff62f804fe4744c2aaf66d0f62fa78fe6b1 /source | |
parent | fd64bb7a41bf72ad19df772a2cae336ded484b87 (diff) |
Fix separator class and tweak parser inheritance.
Diffstat (limited to 'source')
-rw-r--r-- | source/theme.c | 15 | ||||
-rw-r--r-- | source/widgets/separator.c | 2 |
2 files changed, 16 insertions, 1 deletions
diff --git a/source/theme.c b/source/theme.c index e15016a8..3f11edf8 100644 --- a/source/theme.c +++ b/source/theme.c @@ -177,6 +177,9 @@ int rofi_theme_get_integer ( const char *wclass, const char *name, const char * return def; } Widget *widget = rofi_theme_find ( rofi_theme, name ); + if ( widget != rofi_theme ){ + widget = rofi_theme_find ( widget, state ); + } if ( widget == rofi_theme || widget->set == FALSE ){ // Fall back to class widget = rofi_theme_find ( rofi_theme, wclass); @@ -195,6 +198,9 @@ int rofi_theme_get_boolean ( const char *wclass, const char *name, const char * return def; } Widget *widget = rofi_theme_find ( rofi_theme, name ); + if ( widget != rofi_theme ){ + widget = rofi_theme_find ( widget, state ); + } if ( widget == rofi_theme || widget->set == FALSE ){ // Fall back to class widget = rofi_theme_find ( rofi_theme, wclass); @@ -213,6 +219,9 @@ char *rofi_theme_get_string ( const char *wclass, const char *name, const char return def; } Widget *widget = rofi_theme_find ( rofi_theme, name ); + if ( widget != rofi_theme ){ + widget = rofi_theme_find ( widget, state ); + } if ( widget == rofi_theme || widget->set == FALSE ){ // Fall back to class widget = rofi_theme_find ( rofi_theme, wclass); @@ -230,6 +239,9 @@ double rofi_theme_get_double ( const char *wclass, const char *name, const char return def; } Widget *widget = rofi_theme_find ( rofi_theme, name ); + if ( widget != rofi_theme ){ + widget = rofi_theme_find ( widget, state ); + } if ( widget == rofi_theme || widget->set == FALSE ){ // Fall back to class widget = rofi_theme_find ( rofi_theme, wclass); @@ -247,6 +259,9 @@ void rofi_theme_get_color ( const char *wclass, const char *name, const char *s return ; } Widget *widget = rofi_theme_find ( rofi_theme, name ); + if ( widget != rofi_theme ){ + widget = rofi_theme_find ( widget, state ); + } if ( widget == rofi_theme || widget->set == FALSE ){ // Fall back to class widget = rofi_theme_find ( rofi_theme, wclass); diff --git a/source/widgets/separator.c b/source/widgets/separator.c index 295ba95f..c04cecec 100644 --- a/source/widgets/separator.c +++ b/source/widgets/separator.c @@ -88,7 +88,7 @@ separator *separator_create ( const char *name, separator_type type, short sw ) // Enabled by default sb->widget.enabled = TRUE; - const char *line_style = rofi_theme_get_string ( "@scrollbar", sb->widget.name, NULL, "line-style", "solid"); + const char *line_style = rofi_theme_get_string ( "@separator", sb->widget.name, NULL, "line-style", "solid"); separator_set_line_style_from_string ( sb, line_style ); return sb; } |