Skip to content

Commit

Permalink
fix: incorrect size determination
Browse files Browse the repository at this point in the history
  • Loading branch information
kraanzu committed Feb 8, 2024
1 parent f2c6ee5 commit ed1a19d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions smassh/ui/widgets/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ def on_resize(self) -> None:

# NOTE: This seems like a good ratio (5:30) to enable/disable tall mode
if height < 30:
self.disable_tall_mode(height)
self.disable_tall_mode()
else:
self.enable_tall_mode(height)
self.enable_tall_mode()

self.refresh(layout=True)

def enable_tall_mode(self, height) -> None:
def enable_tall_mode(self) -> None:
height = self.size.height
if height == 5:
return

Expand All @@ -61,7 +62,8 @@ def enable_tall_mode(self, height) -> None:
self.query_one(Banner).styles.height = "100%"
self.query_one("Header > Horizontal").styles.height = "100%"

def disable_tall_mode(self, height) -> None:
def disable_tall_mode(self) -> None:
height = self.size.height
if height != 5:
return

Expand Down

0 comments on commit ed1a19d

Please sign in to comment.