Skip to content

Commit

Permalink
Align all checkboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
diegogangl committed Dec 1, 2023
1 parent 21adf6e commit a81b7f7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions GTG/gtk/browser/task_pane.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,13 @@ def set_has_children(self, value) -> bool:

if value:
widget = self.expander
self.check.set_margin_start(0)
else:
widget = self.check
self.expander.set_margin_start(0)

check_width = 21
margin = 6

indent = margin if value else (check_width + _margin)

if self.task.parent:
parent = self.task
Expand All @@ -73,9 +76,9 @@ def set_has_children(self, value) -> bool:
depth += 1
parent = parent.parent

widget.set_margin_start(6 + (21 * depth))
widget.set_margin_start(indent + (21 * depth))
else:
widget.set_margin_start(6)
widget.set_margin_start(indent)


@GObject.Property(type=bool, default=True)
Expand Down

0 comments on commit a81b7f7

Please sign in to comment.