Fall back to integer setting for distance

This commit is contained in:
Dave Davenport 2016-12-31 23:30:57 +01:00
parent 7b0e0643c8
commit fb2d8b37a6

View file

@ -259,6 +259,11 @@ Distance rofi_theme_get_distance ( const char *wclass, const char *name, const
if ( p ){
return p->value.padding.left;
}
// Fall back to px if no metric is given.
p = rofi_theme_find_property ( widget, P_INTEGER, property );
if ( p ){
return (Distance){(double)p->value.i, PW_PX};
}
return (Distance){def, PW_PX};
}