mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
[Theme] When reading double property, allow fallback to integer.
Otherwise the value '1' is not seen as valid entry, only '1.0'. Fixes: #752
This commit is contained in:
parent
ad9c4c0fe5
commit
5ab0a642c9
1 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue