Separator for DropDown menu item

I want to show some horizontal separator for DropDown list (to visually separate first row in list from another ones) is it possible with GTK API for this widget?

image

Hi,

It’s a typical CSS topic, try something like this:

dropdown > popover > contents listview row:not(:last-child) {
	border-bottom: 1px solid @borders;
}
1 Like

Thanks for option, but I’m not using CSS and looking for API method from GTK asset. For example, menu builder make separators when section of items does not have the name, so I’ve build following menu without any external style provider

image

I’m working on GTK app just to have unified, system environmental UI, otherwise Electron and other frameworks where simpler to build the apps with CSS context, but that way is not my goal.

Should be possible, this dropdown uses a GtkListView internally, which has a Gtk.ListView:show-separators property, but I’ve no idea how to access it…

1 Like

Hm, don’t know how but implemented without ListView - it’s ListStore + Widgets only (like Labels). But thanks, maybe just should take a look on similar options in widgets I use.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.