From 551269802f4fedcbe130f139528afa2fdd3967f4 Mon Sep 17 00:00:00 2001 From: jwijenbergh Date: Sat, 18 Nov 2023 15:41:34 +0100 Subject: [PATCH] Groupbox: Set spacing to margin_x in configure widget_defaults is not picked up in __init__, which means that after a config reload we get different spacing (margin_x will be different). --- libqtile/widget/groupbox.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libqtile/widget/groupbox.py b/libqtile/widget/groupbox.py index a698f9a9fa..9af320afc7 100644 --- a/libqtile/widget/groupbox.py +++ b/libqtile/widget/groupbox.py @@ -243,8 +243,6 @@ class GroupBox(_GroupBase): def __init__(self, **config): _GroupBase.__init__(self, **config) self.add_defaults(GroupBox.defaults) - if self.spacing is None: - self.spacing = self.margin_x self.clicked = None self.click = None @@ -258,6 +256,11 @@ def __init__(self, **config): ) self.add_callbacks(default_callbacks) + def _configure(self, qtile, bar): + _GroupBase._configure(self, qtile, bar) + if self.spacing is None: + self.spacing = self.margin_x + @property def groups(self): """