Commit: 511dfb774382f34275bc0928eb65a1e24a9483f4 Author: Julian Eisel Date: Thu Mar 24 17:40:59 2022 +0100 Branches: master https://developer.blender.org/rB511dfb774382f34275bc0928eb65a1e24a9483f4
Outliner: Don't draw library overrides indicator for override buttons All the buttons in the Library Overrides display mode would be shown in cyan, indicating that they are library overrides. Given that this is solely what this display mode is about, the indicator is just redundant, confusing (why are the buttons purple?) and looks weird. Part of T95802. Reviewed by: Bastien Montagne Differential Revision: https://developer.blender.org/D14416 =================================================================== M source/blender/editors/include/UI_interface.h M source/blender/editors/interface/interface_widgets.c M source/blender/editors/space_outliner/outliner_draw.cc =================================================================== diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index a223eac3000..74797f91046 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -157,6 +157,8 @@ enum { UI_BLOCK_POPOVER_ONCE = 1 << 22, /** Always show key-maps, even for non-menus. */ UI_BLOCK_SHOW_SHORTCUT_ALWAYS = 1 << 23, + /** Don't show library override state for buttons in this block. */ + UI_BLOCK_NO_DRAW_OVERRIDDEN_STATE = 1 << 24, /** The block is only used during the search process and will not be drawn. * Currently just for the case of a closed panel's sub-panel (and its sub-panels). */ UI_BLOCK_SEARCH_ONLY = 1 << 25, diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index 35cf952b5ce..b33cab3cbc6 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -4963,6 +4963,9 @@ void ui_draw_but(const bContext *C, struct ARegion *region, uiStyle *style, uiBu } } #endif + if (but->block->flag & UI_BLOCK_NO_DRAW_OVERRIDDEN_STATE) { + state &= ~UI_BUT_OVERRIDDEN; + } const float zoom = 1.0f / but->block->aspect; wt->state(wt, state, drawflag, but->emboss); diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index 8b03047b1dd..9857abb3da7 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -3917,6 +3917,7 @@ void draw_outliner(const bContext *C) block, region, space_outliner, &space_outliner->tree, true); UI_block_emboss_set(block, UI_EMBOSS); + UI_block_flag_enable(block, UI_BLOCK_NO_DRAW_OVERRIDDEN_STATE); const int x = region->v2d.cur.xmax - right_column_width; outliner_draw_separator(region, x); outliner_draw_overrides_rna_buts(block, region, space_outliner, &space_outliner->tree, x); _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
