Skip to content

Commit

Permalink
Fix TreeTab panel bug
Browse files Browse the repository at this point in the history
The TreeTab layout does not create a new Drawer object when the panel
ratio is changed. This results in rendering issues.

Fixes qtile#4979
  • Loading branch information
elParaguayo authored and tych0 committed Sep 27, 2024
1 parent 17e5358 commit 5143535
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libqtile/layout/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,9 @@ def decrease_ratio(self):
def _create_drawer(self, screen_rect):
# Create a new drawer object if the screen is a different height
# e.g. if moving between screens with different resolutions
if self._drawer is not None and self._drawer.height != screen_rect.height:
if self._drawer is not None and (
self._drawer.height != screen_rect.height or self.panel_width != self._drawer.width
):
self._drawer.finalize()
self._drawer = None

Expand Down

0 comments on commit 5143535

Please sign in to comment.