Skip to content

Commit

Permalink
feat(colors_list: oomox_listbox): add separators between listbox rows…
Browse files Browse the repository at this point in the history
… (re: #190)
  • Loading branch information
actionless committed Sep 20, 2020
1 parent 1c228ad commit 7111931
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions oomox_gui/colors_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,13 @@ def __init__(self, *args, **kwargs):
self.set_margin_top(SECTION_MARGIN//2)
self.listbox = Gtk.ListBox()
self.listbox.set_selection_mode(Gtk.SelectionMode.NONE)

def update_listbox_header(row, before):
if before and not row.get_header():
row.set_header(Gtk.Separator(orientation=Gtk.Orientation.HORIZONTAL))

self.listbox.set_header_func(update_listbox_header)

# self.titlebox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
self.titlebox = Gtk.Stack()
self.titlebox.set_margin_bottom(LIST_ITEM_MARGIN)
Expand Down

0 comments on commit 7111931

Please sign in to comment.