summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-12-31 23:34:48 +0100
committerDave Davenport <qball@gmpclient.org>2016-12-31 23:34:48 +0100
commit05871703d510554ff8d41de4c099e4621b56de59 (patch)
treef8538f91069be11632bcd544eea3400233c450ae
parentfb2d8b37a66823641be9cdf03c369a45971beb3c (diff)
Fall back to old style padding (with int) if no metric specified.
-rw-r--r--source/theme.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/theme.c b/source/theme.c
index 50f20695..e8b2d97f 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -315,6 +315,12 @@ Padding rofi_theme_get_padding ( const char *wclass, const char *name, const ch
Property *p = rofi_theme_find_property ( widget, P_PADDING, property );
if ( p ){
pad = p->value.padding;
+ }else {
+ p = rofi_theme_find_property ( widget, P_INTEGER, property );
+ if ( p ){
+ Distance d = (Distance){p->value.i, PW_PX};
+ pad = (Padding){d,d,d,d};
+ }
}
return pad;
}