mirror of
https://github.com/davatorium/rofi.git
synced 2025-07-31 21:59:25 -04: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;
|
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 );
|
g_debug ( "Theme entry: #%s %s property %s unset.", widget->name, widget->state ? widget->state : "", property );
|
||||||
return def;
|
return def;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue