diff --git a/adafruit_displayio_layout/layouts/grid_layout.py b/adafruit_displayio_layout/layouts/grid_layout.py index e63d6ac..e3b1a50 100644 --- a/adafruit_displayio_layout/layouts/grid_layout.py +++ b/adafruit_displayio_layout/layouts/grid_layout.py @@ -44,10 +44,12 @@ class GridLayout(displayio.Group): lines above. Row indexes are 0 based. :param Union[tuple, list] v_divider_line_cols: Column indexes to draw divider lines before. Column indexes are 0 based. + :param divider_line_color: The color of the divider lines (in hexadecimal) """ # pylint: disable=too-many-arguments + # pylint: disable=too-many-instance-attributes def __init__( self, x, @@ -59,6 +61,7 @@ def __init__( divider_lines=False, h_divider_line_rows=None, v_divider_line_cols=None, + divider_line_color=0xFFFFFF, ): super().__init__(x=x, y=y) self.x = x @@ -70,6 +73,7 @@ def __init__( self._cell_content_list = [] self._divider_lines = [] + self._divider_color = divider_line_color self.h_divider_line_rows = h_divider_line_rows self.v_divider_line_cols = v_divider_line_cols @@ -164,8 +168,8 @@ def _layout_cells(self): if self._divider_lines_enabled: palette = displayio.Palette(2) - palette[0] = 0xFFFFFF - palette[1] = 0xFFFFFF + palette[0] = self._divider_color + palette[1] = self._divider_color if not hasattr(cell["content"], "anchor_point"): _bottom_line_loc_y = (