'Update plugin margins'

def update_margins(self):

    layout = self.layout()
    if (self.default_margins is None):
        self.default_margins = layout.getContentsMargins()
    if CONF.get('main', 'use_custom_margin'):
        margin = CONF.get('main', 'custom_margin')
        layout.setContentsMargins(*([margin] * 4))
    else:
        layout.setContentsMargins(*self.default_margins)
