diff --git a/lightgui/xframe/core.py b/lightgui/xframe/core.py index 830e744..f0a45a7 100644 --- a/lightgui/xframe/core.py +++ b/lightgui/xframe/core.py @@ -1496,8 +1496,9 @@ class ListSelWidget(Widget): cr.rectangle(1, y, self.width - 2, rh) cr.fill() x = 6 + depth * indent - if _prop_bool(self, "show-buttons", True) and depth == 0 \ - and len(rows) > 1: + has_children = (i + 1 < len(rows) + and rows[i + 1].startswith(path + "/")) + if _prop_bool(self, "show-buttons", True) and has_children: _triangle(cr, x + 4, y + rh / 2, 8, "down" if i == 0 else "right") x += 12 @@ -1809,6 +1810,12 @@ class ContainerWidget(Widget): y += 16 row_h = max(14, (self.height - y - 2) / 6.0) for row in range(6): + if show_week: + from datetime import timedelta as _td + monday = first + _td(days=row * 7 - start_col) + _wtext(cr, self, str(monday.isocalendar()[1]), + 14, y + row * row_h + row_h / 2 + 4, size=10, + align="center", rgb=(0.5, 0.5, 0.5)) for col in range(7): day = row * 7 + col - start_col + 1 cx = x0 + col * col_w