UI: Tooltip Final Period and Other Typography

This removes the terminal periods automatically added to the end of
tooltip items. The current desire is to only end in period if there
are multiple sentences - so if there is one in the middle of the
description. This also converts our uses of lists to use space and
bullet, rather than just bullet or asterisks.

Pull Request: https://projects.blender.org/blender/blender/pulls/125460
This commit is contained in:
Harley Acheson
2024-07-26 18:29:50 +02:00
committed by Harley Acheson
parent 406a2d3ff0
commit f2f408bebf
3 changed files with 37 additions and 37 deletions

View File

@@ -541,7 +541,7 @@ static std::unique_ptr<uiTooltipData> ui_tooltip_data_from_tool(bContext *C,
"bl_ui.space_toolsystem_common.description_from_id("
"bpy.context, "
"bpy.context.space_data.type, "
"'%s') + '.'",
"'%s')",
tool_id);
char *expr_result = nullptr;
@@ -843,11 +843,11 @@ static std::unique_ptr<uiTooltipData> ui_tooltip_data_from_button_or_extra_icon(
if (!but_tip.empty()) {
if (!enum_label.empty()) {
UI_tooltip_text_field_add(
*data, fmt::format("{}: ", but_tip), enum_label, UI_TIP_STYLE_HEADER, UI_TIP_LC_NORMAL);
*data, fmt::format("{}: ", but_tip), enum_label, UI_TIP_STYLE_HEADER, UI_TIP_LC_NORMAL);
}
else {
UI_tooltip_text_field_add(
*data, fmt::format("{}.", but_tip), {}, UI_TIP_STYLE_HEADER, UI_TIP_LC_NORMAL);
*data, fmt::format("{}", but_tip), {}, UI_TIP_STYLE_HEADER, UI_TIP_LC_NORMAL);
}
/* special case enum rna buttons */

View File

@@ -1193,7 +1193,7 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Temporarily hide in viewport\n"
"* Shift to set children"));
" \u2022 Shift to set children"));
UI_but_func_set(
bt, outliner__base_set_flag_recursive_fn, base, (void *)"hide_viewport");
UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK);
@@ -1218,7 +1218,7 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Disable selection in viewport\n"
"* Shift to set children"));
" \u2022 Shift to set children"));
UI_but_func_set(bt, outliner__object_set_flag_recursive_fn, ob, (char *)"hide_select");
UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK);
if (!props_active.object_hide_select) {
@@ -1241,7 +1241,7 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Globally disable in viewports\n"
"* Shift to set children"));
" \u2022 Shift to set children"));
UI_but_func_set(bt, outliner__object_set_flag_recursive_fn, ob, (void *)"hide_viewport");
UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK);
if (!props_active.object_hide_viewport) {
@@ -1264,7 +1264,7 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Globally disable in renders\n"
"* Shift to set children"));
" \u2022 Shift to set children"));
UI_but_func_set(bt, outliner__object_set_flag_recursive_fn, ob, (char *)"hide_render");
UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK);
if (!props_active.object_hide_render) {
@@ -1368,7 +1368,7 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Restrict visibility in the 3D View\n"
"* Shift to set children"));
" \u2022 Shift to set children"));
UI_but_func_set(bt, restrictbutton_bone_visibility_fn, bone, nullptr);
UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK);
UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE);
@@ -1388,7 +1388,7 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Restrict selection in the 3D View\n"
"* Shift to set children"));
" \u2022 Shift to set children"));
UI_but_func_set(bt, restrictbutton_bone_select_fn, ob->data, bone);
UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK);
UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE);
@@ -1412,7 +1412,7 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Restrict visibility in the 3D View\n"
"* Shift to set children"));
" \u2022 Shift to set children"));
UI_but_func_set(bt, restrictbutton_ebone_visibility_fn, arm, ebone);
UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK);
UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE);
@@ -1432,7 +1432,7 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Restrict selection in the 3D View\n"
"* Shift to set children"));
" \u2022 Shift to set children"));
UI_but_func_set(bt, restrictbutton_ebone_select_fn, arm, ebone);
UI_but_flag_enable(bt, UI_BUT_DRAG_LOCK);
UI_but_drawflag_enable(bt, UI_BUT_ICON_REVERSE);
@@ -1561,8 +1561,8 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Temporarily hide in viewport\n"
"* Ctrl to isolate collection\n"
"* Shift to set inside collections and objects"));
" \u2022 Ctrl to isolate collection\n"
" \u2022 Shift to set inside collections and objects"));
UI_but_func_set(bt,
view_layer__layer_collection_set_flag_recursive_fn,
layer_collection,
@@ -1588,8 +1588,8 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Mask out objects in collection from view layer\n"
"* Ctrl to isolate collection\n"
"* Shift to set inside collections"));
" \u2022 Ctrl to isolate collection\n"
" \u2022 Shift to set inside collections"));
UI_but_func_set(bt,
view_layer__layer_collection_set_flag_recursive_fn,
layer_collection,
@@ -1617,8 +1617,8 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
TIP_("Objects in collection only contribute indirectly (through shadows and "
"reflections) in the view layer\n"
"* Ctrl to isolate collection\n"
"* Shift to set inside collections"));
" \u2022 Ctrl to isolate collection\n"
" \u2022 Shift to set inside collections"));
UI_but_func_set(bt,
view_layer__layer_collection_set_flag_recursive_fn,
layer_collection,
@@ -1647,8 +1647,8 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Globally disable in viewports\n"
"* Ctrl to isolate collection\n"
"* Shift to set inside collections and objects"));
" \u2022 Ctrl to isolate collection\n"
" \u2022 Shift to set inside collections and objects"));
if (layer_collection != nullptr) {
UI_but_func_set(bt,
view_layer__collection_set_flag_recursive_fn,
@@ -1682,8 +1682,8 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Globally disable in renders\n"
"* Ctrl to isolate collection\n"
"* Shift to set inside collections and objects"));
" \u2022 Ctrl to isolate collection\n"
" \u2022 Shift to set inside collections and objects"));
if (layer_collection != nullptr) {
UI_but_func_set(bt,
view_layer__collection_set_flag_recursive_fn,
@@ -1715,8 +1715,8 @@ static void outliner_draw_restrictbuts(uiBlock *block,
0,
0,
TIP_("Disable selection in viewport\n"
"* Ctrl to isolate collection\n"
"* Shift to set inside collections and objects"));
" \u2022 Ctrl to isolate collection\n"
" \u2022 Shift to set inside collections and objects"));
if (layer_collection != nullptr) {
UI_but_func_set(bt,
view_layer__collection_set_flag_recursive_fn,
@@ -2239,7 +2239,7 @@ static void outliner_draw_mode_column_toggle(uiBlock *block,
icon = ICON_DOT;
tip = TIP_(
"Change the object in the current mode\n"
"* Ctrl to add to the current mode");
" \u2022 Ctrl to add to the current mode");
}
UI_block_emboss_set(block, UI_EMBOSS_NONE_OR_STATUS);
uiBut *but = uiDefIconBut(block,