Fix #100264: Outliner icon overlap when filter collection is off

In Outliner (View Layer mode) when filter "Collections" is off the icon
of the object mode overlaps with "arrow" icon (if "Show Mode Column" is
enabled). To fix this, add offset for this specific case and also when
"All View Layers" is off.

Pull Request: https://projects.blender.org/blender/blender/pulls/132339
This commit is contained in:
Pratik Borhade
2025-01-01 20:15:14 +01:00
committed by Harley Acheson
parent ae90d0defd
commit 25febbbb32

View File

@@ -3821,11 +3821,13 @@ static void outliner_draw_tree(uiBlock *block,
{
const uiFontStyle *fstyle = UI_FSTYLE_WIDGET;
short columns_offset = use_mode_column ? UI_UNIT_X : 0;
/* Move the tree a unit left in view layer mode */
short columns_offset = (use_mode_column && (space_outliner->outlinevis == SO_SCENES)) ?
UI_UNIT_X :
0;
if (!use_mode_column && (space_outliner->outlinevis == SO_VIEW_LAYER)) {
if ((space_outliner->outlinevis == SO_VIEW_LAYER) &&
!(space_outliner->filter & SO_FILTER_NO_COLLECTION) &&
(space_outliner->filter & SO_FILTER_NO_VIEW_LAYERS))
{
columns_offset -= UI_UNIT_X;
}