Stop wrapping the spacer as Text

It's not needed. It has no style of its own. It's just a space.
This commit is contained in:
Dave Pearson
2023-02-22 21:01:03 +00:00
parent 91199fd6e9
commit 1b2f5a15a3

View File

@@ -165,7 +165,7 @@ class ToggleButton(Static, can_focus=True):
button = self._button
label = self._label.copy()
label.stylize(self.get_component_rich_style("toggle--label", partial=True))
spacer = Text(" " if label else "")
spacer = " " if label else ""
return (
Text.assemble(button, spacer, label)
if self._button_first