From 25febbbb32bf55aab01fa7bcb31b7b97a93d00bc Mon Sep 17 00:00:00 2001 From: Pratik Borhade Date: Wed, 1 Jan 2025 20:15:14 +0100 Subject: [PATCH] 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 --- source/blender/editors/space_outliner/outliner_draw.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index 14b46ceb05f..992aacf1594 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -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; }