Skip to content

Commit

Permalink
Git log: More spacing
Browse files Browse the repository at this point in the history
Allows you to better hit buttons.
Put BACK button in foreground, so it's clickable even if another object overlaps
  • Loading branch information
soerface committed Oct 26, 2024
1 parent f444009 commit caf26a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drinks_touch/screens/git/branch_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def on_start(self, *args, **kwargs):
pos=(10, 20),
size=36,
),
VBox(branch_buttons, gap=5, pos=(10, 80)),
Button(
text="BACK",
pos=(5, 795),
Expand All @@ -43,6 +42,7 @@ def on_start(self, *args, **kwargs):
font=config.FONTS["monospace"],
size=30,
),
VBox(branch_buttons, gap=5, pos=(10, 80)),
]

def get_branches(self):
Expand Down
12 changes: 6 additions & 6 deletions drinks_touch/screens/git/log_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,14 @@ def on_start(self, *args, **kwargs):
),
]
)
for commit in self.get_commits(15)
for commit in self.get_commits(12)
]
self.objects = [
Label(
text=f"git log {self.branch}",
pos=(10, 20),
size=36,
),
VBox(
commit_buttons,
pos=(10, 70),
gap=5,
),
Button(
text="BACK",
pos=(5, 795),
Expand All @@ -90,6 +85,11 @@ def on_start(self, *args, **kwargs):
font=config.FONTS["monospace"],
size=30,
),
VBox(
commit_buttons,
pos=(10, 70),
gap=16,
),
]

def get_commits(self, max_num=None) -> list[Commit]:
Expand Down

0 comments on commit caf26a3

Please sign in to comment.