summaryrefslogtreecommitdiffstats
path: root/source/theme.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/theme.c')
-rw-r--r--source/theme.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/theme.c b/source/theme.c
index 85062f8c..069b9ef3 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -1158,3 +1158,20 @@ ThemeMediaType rofi_theme_parse_media_type ( const char *type )
}
return THEME_MEDIA_TYPE_INVALID;
}
+
+
+gboolean rofi_theme_has_property ( const widget *widget, const char *property )
+{
+ ThemeWidget *wid = rofi_theme_find_widget ( widget->name, widget->state, FALSE );
+ Property *p = rofi_theme_find_property ( wid, P_STRING, property, FALSE );
+ if ( p ) {
+ if ( p->type == P_INHERIT ) {
+ if ( widget->parent ) {
+ return rofi_theme_has_property ( widget->parent, property );
+ }
+ return FALSE;
+ }
+ return TRUE;
+ }
+ return FALSE;
+}