UI: Consistent Use of Chevron Disclosure Icons #116240

Merged
Harley Acheson merged 5 commits from Harley/blender:Disclosures into main 2024-01-30 22:35:25 +01:00
16 changed files with 22 additions and 28 deletions

View File

@ -5252,7 +5252,7 @@ static void draw_setting_widget(bAnimContext *ac,
case ACHANNEL_SETTING_EXPAND: /* expanded triangle */
// icon = (enabled ? ICON_TRIA_DOWN : ICON_TRIA_RIGHT);
icon = ICON_TRIA_RIGHT;
icon = ICON_RIGHTARROW;
tooltip = TIP_("Make channels grouped under this channel visible");
break;

View File

@ -1095,7 +1095,7 @@ static void panel_draw_aligned_widgets(const uiStyle *style,
const float size_y = BLI_rcti_size_y(&widget_rect);
GPU_blend(GPU_BLEND_ALPHA);
UI_icon_draw_ex(widget_rect.xmin + size_y * 0.2f,
widget_rect.ymin + size_y * 0.2f,
widget_rect.ymin + size_y * 0.13f,
UI_panel_is_closed(panel) ? ICON_RIGHTARROW : ICON_DOWNARROW_HLT,
aspect * UI_INV_SCALE_FAC,
0.7f,

View File

@ -368,7 +368,7 @@ void AbstractTreeViewItem::add_collapse_chevron(uiBlock &block) const
return;
}
const BIFIconID icon = is_collapsed() ? ICON_TRIA_RIGHT : ICON_TRIA_DOWN;
const BIFIconID icon = is_collapsed() ? ICON_RIGHTARROW : ICON_DOWNARROW_HLT;
uiBut *but = uiDefIconBut(
&block, UI_BTYPE_BUT_TOGGLE, 0, icon, 0, 0, UI_UNIT_X, UI_UNIT_Y, nullptr, 0, 0, 0, 0, "");
/* Note that we're passing the tree-row button here, not the chevron one. */

View File

@ -802,8 +802,7 @@ static void ui_node_draw_panel(uiLayout &layout,
uiBut *but = uiDefIconTextBut(block,
UI_BTYPE_BUT,
0,
panel_state.is_collapsed() ? ICON_DISCLOSURE_TRI_RIGHT :
ICON_DISCLOSURE_TRI_DOWN,
panel_state.is_collapsed() ? ICON_RIGHTARROW : ICON_DOWNARROW_HLT,
IFACE_(panel_decl.name.c_str()),
0,
0,
@ -928,8 +927,7 @@ static void ui_node_draw_input(uiLayout &layout,
if (lnode &&
(lnode->inputs.first || (lnode->typeinfo->draw_buttons && lnode->type != NODE_GROUP)))
{
int icon = (input.flag & SOCK_COLLAPSED) ? ICON_DISCLOSURE_TRI_RIGHT :
ICON_DISCLOSURE_TRI_DOWN;
int icon = (input.flag & SOCK_COLLAPSED) ? ICON_RIGHTARROW : ICON_DOWNARROW_HLT;
uiItemR(sub, &inputptr, "show_expanded", UI_ITEM_R_ICON_ONLY, "", icon);
}

View File

@ -3433,16 +3433,12 @@ static void outliner_draw_tree_element(bContext *C,
/* Icons a bit higher. */
if (TSELEM_OPEN(tselem, space_outliner)) {
UI_icon_draw_alpha(float(icon_x) + 2 * ufac,
float(*starty) + 1 * ufac,
ICON_DISCLOSURE_TRI_DOWN,
alpha_fac);
UI_icon_draw_alpha(
float(icon_x) + 2 * ufac, float(*starty) + 1 * ufac, ICON_DOWNARROW_HLT, alpha_fac);
}
else {
UI_icon_draw_alpha(float(icon_x) + 2 * ufac,
float(*starty) + 1 * ufac,
ICON_DISCLOSURE_TRI_RIGHT,
alpha_fac);
UI_icon_draw_alpha(
float(icon_x) + 2 * ufac, float(*starty) + 1 * ufac, ICON_RIGHTARROW, alpha_fac);
}
}
offsx += UI_UNIT_X;

View File

@ -401,7 +401,7 @@ static void rna_def_dopesheet(BlenderRNA *brna)
prop,
"Show Data-Block Filters",
"Show options for whether channels related to certain types of data are included");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
RNA_def_property_update(prop, NC_ANIMATION | ND_ANIMCHAN, nullptr);
/* General Filtering Settings */

View File

@ -345,7 +345,7 @@ static void rna_def_camera_background_image(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", CAM_BGIMG_FLAG_EXPANDED);
RNA_def_property_ui_text(prop, "Show Expanded", "Show the details in the user interface");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
prop = RNA_def_property(srna, "use_camera_clip", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", CAM_BGIMG_FLAG_CAMERACLIP);

View File

@ -3543,7 +3543,7 @@ void RNA_def_constraint(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
RNA_def_property_boolean_sdna(prop, nullptr, "ui_expand_flag", 0);
RNA_def_property_ui_text(prop, "Expanded", "Constraint's panel is expanded in UI");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
/* XXX this is really an internal flag,
* but it may be useful for some tools to be able to access this... */

View File

@ -1772,7 +1772,7 @@ static void rna_def_fmodifier(BlenderRNA *brna)
// RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_boolean_funcs(prop, nullptr, "rna_FModifier_show_expanded_set");
RNA_def_property_ui_text(prop, "Expanded", "F-Curve Modifier's panel is expanded in UI");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", FMODIFIER_FLAG_MUTED);

View File

@ -4707,7 +4707,7 @@ void RNA_def_greasepencil_modifier(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, nullptr, "ui_expand_flag", 0);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
prop = RNA_def_boolean(srna,
"is_override_data",

View File

@ -8402,7 +8402,7 @@ void RNA_def_modifier(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, nullptr, "ui_expand_flag", 0);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, nullptr);
prop = RNA_def_property(srna, "is_active", PROP_BOOLEAN, PROP_NONE);

View File

@ -3641,7 +3641,7 @@ static void rna_def_modifier(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQUENCE_MODIFIER_EXPANDED);
RNA_def_property_ui_text(prop, "Expanded", "Mute expanded settings for the modifier");
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, nullptr);
prop = RNA_def_property(srna, "input_mask_type", PROP_ENUM, PROP_NONE);

View File

@ -704,7 +704,7 @@ void RNA_def_shader_fx(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, nullptr, "ui_expand_flag", 0);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_ui_text(prop, "Expanded", "Set effect expansion in the user interface");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
/* types */
rna_def_shader_fx_blur(brna);

View File

@ -8058,7 +8058,7 @@ static void rna_def_spreadsheet_row_filter(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", SPREADSHEET_ROW_FILTER_UI_EXPAND);
RNA_def_property_ui_text(prop, "Show Expanded", "");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SPREADSHEET, nullptr);
prop = RNA_def_property(srna, "column_name", PROP_STRING, PROP_NONE);

View File

@ -2101,7 +2101,7 @@ static void rna_def_trackingStabilization(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, nullptr, "flag", TRACKING_SHOW_STAB_TRACKS);
RNA_def_property_ui_text(
prop, "Show Tracks", "Show UI list of tracks participating in stabilization");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
}
static void rna_def_reconstructedCamera(BlenderRNA *brna)

View File

@ -2711,12 +2711,12 @@ static void rna_def_keyconfig(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_expanded_items", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", KEYMAP_EXPANDED);
RNA_def_property_ui_text(prop, "Items Expanded", "Expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
prop = RNA_def_property(srna, "show_expanded_children", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", KEYMAP_CHILDREN_EXPANDED);
RNA_def_property_ui_text(prop, "Children Expanded", "Children expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
prop = RNA_def_property(srna, "modal_event_values", PROP_COLLECTION, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
@ -2884,7 +2884,7 @@ static void rna_def_keyconfig(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, nullptr, "flag", KMI_EXPANDED);
RNA_def_property_ui_text(
prop, "Expanded", "Show key map event and property details in the user interface");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);
RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
/* Display only, no need to call `rna_KeyMapItem_update`. */
prop = RNA_def_property(srna, "propvalue", PROP_ENUM, PROP_NONE);