treeview: make sure separator nodes have a height > 0
In case the theme doesn't set a height/min-height for the treeview separator the treeview drawing gets confused and draws rows on top of each other depending on the redraw area. This is due to gtk_tree_view_get_row_height() assuming that a node with a height <= 0 is not set and not a separator and it will default to the expander size. Ideally gtk_tree_view_get_row_height() would know if it operates on a separator, but there are too many calls/levels, so just make sure the separator height is at least 1 (Adwaita already sets "min-height: 2px", so no change there) Cherry-picked from !614 to master
This commit is contained in:
committed by
Christoph Reiter
parent
45ea288ba2
commit
348912dff4
@@ -5614,6 +5614,8 @@ validate_row (GtkTreeView *tree_view,
|
||||
if (is_separator)
|
||||
{
|
||||
height = separator_height;
|
||||
/* gtk_tree_view_get_row_height() assumes separator nodes are > 0 */
|
||||
height = MAX (height, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user