summaryrefslogtreecommitdiffstats
path: root/source/theme.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/theme.c')
-rw-r--r--source/theme.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/theme.c b/source/theme.c
index 44081964..83b745f4 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -630,6 +630,17 @@ double rofi_theme_get_double ( const widget *widget, const char *property, doubl
}
return p->value.f;
}
+ // Fallback to integer if double is not found.
+ p = rofi_theme_find_property ( wid, P_INTEGER, property, FALSE );
+ if ( p ) {
+ if ( p->type == P_INHERIT ) {
+ if ( widget->parent ) {
+ return rofi_theme_get_double ( widget->parent, property, def );
+ }
+ return def;
+ }
+ return (double)p->value.i;
+ }
g_debug ( "Theme entry: #%s %s property %s unset.", widget->name, widget->state ? widget->state : "", property );
return def;
}