Skip to content

Commit

Permalink
Groupbox: Set spacing to margin_x in configure
Browse files Browse the repository at this point in the history
widget_defaults is not picked up in __init__, which means that after a
config reload we get different spacing (margin_x will be different).
  • Loading branch information
jwijenbergh authored and elParaguayo committed Nov 18, 2023
1 parent 5203110 commit 5512698
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libqtile/widget/groupbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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):
"""
Expand Down

0 comments on commit 5512698

Please sign in to comment.