UI: replace "x" with multiplication sign when displaying calculations #106388

Merged
Harley Acheson merged 2 commits from pioverfour/blender:dp_replace_x_in_dimensions into main 2023-06-27 21:03:12 +02:00
11 changed files with 70 additions and 29 deletions

View File

@ -1202,7 +1202,7 @@ void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *i
const int len = MAX_IMAGE_INFO_LEN;
int ofs = 0;
ofs += BLI_snprintf_rlen(str + ofs, len - ofs, TIP_("%d x %d, "), ibuf->x, ibuf->y);
ofs += BLI_snprintf_rlen(str + ofs, len - ofs, TIP_("%d \u00D7 %d, "), ibuf->x, ibuf->y);
if (ibuf->float_buffer.data) {
if (ibuf->channels != 4) {

View File

@ -1467,7 +1467,7 @@ static void draw_grid_unit_name(
char numstr[32] = "";
UI_FontThemeColor(font_id, TH_TEXT_HI);
if (v3d->grid != 1.0f) {
SNPRINTF(numstr, "%s x %.4g", grid_unit, v3d->grid);
SNPRINTF(numstr, "%s " BLI_STR_UTF8_MULTIPLICATION_SIGN " %.4g", grid_unit, v3d->grid);
}
*yoffset -= VIEW3D_OVERLAY_LINEHEIGHT;

View File

@ -9,6 +9,7 @@
#include <stdlib.h>
#include "BLI_math.h"
#include "BLI_string_utf8_symbols.h"
#include "BLT_translation.h"
@ -1226,14 +1227,17 @@ static void rna_def_bone(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, nullptr, "bone_mat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_3x3);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Bone Matrix", "3x3 bone matrix");
RNA_def_property_ui_text(
prop, "Bone Matrix", "3" BLI_STR_UTF8_MULTIPLICATION_SIGN "3 bone matrix");
prop = RNA_def_property(srna, "matrix_local", PROP_FLOAT, PROP_MATRIX);
RNA_def_property_float_sdna(prop, nullptr, "arm_mat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(
prop, "Bone Armature-Relative Matrix", "4x4 bone matrix relative to armature");
RNA_def_property_ui_text(prop,
"Bone Armature-Relative Matrix",
"4" BLI_STR_UTF8_MULTIPLICATION_SIGN
"4 bone matrix relative to armature");
prop = RNA_def_property(srna, "tail", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, nullptr, "tail");

View File

@ -12,6 +12,8 @@
#include "BKE_dynamicpaint.h"
#include "BKE_modifier.h"
#include "BLI_string_utf8_symbols.h"
#include "BLT_translation.h"
#include "DNA_dynamicpaint_types.h"
@ -461,7 +463,10 @@ static void rna_def_canvas_surface(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_ANTIALIAS);
RNA_def_property_ui_text(prop, "Anti-Aliasing", "Use 5x multisampling to smooth paint edges");
RNA_def_property_ui_text(prop,
"Anti-Aliasing",
"Use 5" BLI_STR_UTF8_MULTIPLICATION_SIGN
" multisampling to smooth paint edges");
RNA_def_property_update(prop, NC_OBJECT | ND_MODIFIER, "rna_DynamicPaintSurface_reset");
prop = RNA_def_property(srna, "brush_influence_scale", PROP_FLOAT, PROP_FACTOR);

View File

@ -11,6 +11,7 @@
#include <string.h>
#include "BLI_math.h"
#include "BLI_string_utf8_symbols.h"
#include "BLI_utildefines.h"
#include "BLF_api.h"
@ -118,12 +119,36 @@ static const EnumPropertyItem node_quality_items[] = {
};
static const EnumPropertyItem node_chunksize_items[] = {
{NTREE_CHUNKSIZE_32, "32", 0, "32x32", "Chunksize of 32x32"},
{NTREE_CHUNKSIZE_64, "64", 0, "64x64", "Chunksize of 64x64"},
{NTREE_CHUNKSIZE_128, "128", 0, "128x128", "Chunksize of 128x128"},
{NTREE_CHUNKSIZE_256, "256", 0, "256x256", "Chunksize of 256x256"},
{NTREE_CHUNKSIZE_512, "512", 0, "512x512", "Chunksize of 512x512"},
{NTREE_CHUNKSIZE_1024, "1024", 0, "1024x1024", "Chunksize of 1024x1024"},
{NTREE_CHUNKSIZE_32,
"32",
0,
"32" BLI_STR_UTF8_MULTIPLICATION_SIGN "32",
"Chunksize of 32" BLI_STR_UTF8_MULTIPLICATION_SIGN "32"},
{NTREE_CHUNKSIZE_64,
"64",
0,
"64" BLI_STR_UTF8_MULTIPLICATION_SIGN "64",
"Chunksize of 64" BLI_STR_UTF8_MULTIPLICATION_SIGN "64"},
{NTREE_CHUNKSIZE_128,
"128",
0,
"128" BLI_STR_UTF8_MULTIPLICATION_SIGN "128",
"Chunksize of 128" BLI_STR_UTF8_MULTIPLICATION_SIGN "128"},
{NTREE_CHUNKSIZE_256,
"256",
0,
"256" BLI_STR_UTF8_MULTIPLICATION_SIGN "256",
"Chunksize of 256" BLI_STR_UTF8_MULTIPLICATION_SIGN "256"},
{NTREE_CHUNKSIZE_512,
"512",
0,
"512" BLI_STR_UTF8_MULTIPLICATION_SIGN "512",
"Chunksize of 512" BLI_STR_UTF8_MULTIPLICATION_SIGN "512"},
{NTREE_CHUNKSIZE_1024,
"1024",
0,
"1024" BLI_STR_UTF8_MULTIPLICATION_SIGN "1024",
"Chunksize of 1024" BLI_STR_UTF8_MULTIPLICATION_SIGN "1024"},
{0, nullptr, 0, nullptr, nullptr},
};
#endif

View File

@ -21,6 +21,7 @@
#include "DNA_scene_types.h"
#include "BLI_math.h"
#include "BLI_string_utf8_symbols.h"
#include "BLT_translation.h"
@ -1145,7 +1146,8 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop,
"Channel Matrix",
"4x4 matrix of the bone's location/rotation/scale channels (including "
"4" BLI_STR_UTF8_MULTIPLICATION_SIGN
"4 matrix of the bone's location/rotation/scale channels (including "
"animation and drivers) and the effect of bone constraints");
/* writable because it touches loc/scale/rot directly */
@ -1165,10 +1167,11 @@ static void rna_def_pose_channel(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, nullptr, "pose_mat");
RNA_def_property_multi_array(prop, 2, rna_matrix_dimsize_4x4);
RNA_def_property_float_funcs(prop, nullptr, "rna_PoseChannel_matrix_set", nullptr);
RNA_def_property_ui_text(
prop,
"Pose Matrix",
"Final 4x4 matrix after constraints and drivers are applied, in the armature object space");
RNA_def_property_ui_text(prop,
"Pose Matrix",
"Final 4" BLI_STR_UTF8_MULTIPLICATION_SIGN
"4 matrix after constraints and drivers are applied, in "
"the armature object space");
RNA_def_property_update(prop, NC_OBJECT | ND_POSE, "rna_Pose_update");
/* Head/Tail Coordinates (in Pose Space) - Automatically calculated... */

View File

@ -27,6 +27,7 @@
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_string_utf8_symbols.h"
#include "BLT_translation.h"
@ -6320,10 +6321,10 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
static const EnumPropertyItem pixel_size_items[] = {
{0, "AUTO", 0, "Automatic", "Automatic pixel size, depends on the user interface scale"},
{1, "1", 0, "1x", "Render at full resolution"},
{2, "2", 0, "2x", "Render at 50% resolution"},
{4, "4", 0, "4x", "Render at 25% resolution"},
{8, "8", 0, "8x", "Render at 12.5% resolution"},
{1, "1", 0, "1" BLI_STR_UTF8_MULTIPLICATION_SIGN, "Render at full resolution"},
{2, "2", 0, "2" BLI_STR_UTF8_MULTIPLICATION_SIGN, "Render at 50% resolution"},
{4, "4", 0, "4" BLI_STR_UTF8_MULTIPLICATION_SIGN, "Render at 25% resolution"},
{8, "8", 0, "8" BLI_STR_UTF8_MULTIPLICATION_SIGN, "Render at 12.5% resolution"},
{0, NULL, 0, NULL, NULL},
};

View File

@ -19,6 +19,7 @@
#include "BLI_iterator.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_string_utf8_symbols.h"
#include "BLI_string_utils.h"
#include "BLT_translation.h"
@ -1649,8 +1650,8 @@ static const EnumPropertyItem transform_filter_items[] = {
{SEQ_TRANSFORM_FILTER_NEAREST_3x3,
"SUBSAMPLING_3x3",
0,
"Subsampling (3x3)",
"Use nearest with 3x3 subsamples during rendering"},
"Subsampling (3" BLI_STR_UTF8_MULTIPLICATION_SIGN "3)",
"Use nearest with 3" BLI_STR_UTF8_MULTIPLICATION_SIGN "3 subsamples during rendering"},
{0, NULL, 0, NULL, NULL},
};

View File

@ -18,6 +18,7 @@
#include "BLI_math_base.h"
#include "BLI_math_rotation.h"
#include "BLI_string_utf8_symbols.h"
#include "BLI_utildefines.h"
#ifdef WIN32
# include "BLI_winstuff.h"
@ -5454,10 +5455,10 @@ static void rna_def_userdef_system(BlenderRNA *brna)
static const EnumPropertyItem anisotropic_items[] = {
{1, "FILTER_0", 0, "Off", ""},
{2, "FILTER_2", 0, "2x", ""},
{4, "FILTER_4", 0, "4x", ""},
{8, "FILTER_8", 0, "8x", ""},
{16, "FILTER_16", 0, "16x", ""},
{2, "FILTER_2", 0, "2" BLI_STR_UTF8_MULTIPLICATION_SIGN, ""},
{4, "FILTER_4", 0, "4" BLI_STR_UTF8_MULTIPLICATION_SIGN, ""},
{8, "FILTER_8", 0, "8" BLI_STR_UTF8_MULTIPLICATION_SIGN, ""},
{16, "FILTER_16", 0, "16" BLI_STR_UTF8_MULTIPLICATION_SIGN, ""},
{0, NULL, 0, NULL, NULL},
};

View File

@ -20,6 +20,7 @@
#include "BKE_volume.h"
#include "BLI_math_base.h"
#include "BLI_string_utf8_symbols.h"
#include "BLT_translation.h"
@ -418,7 +419,7 @@ static void rna_def_volume_display(BlenderRNA *brna)
"FINE",
0,
"Fine",
"Display box for each leaf node containing 8x8 voxels"},
"Display box for each leaf node containing 8" BLI_STR_UTF8_MULTIPLICATION_SIGN "8 voxels"},
{0, NULL, 0, NULL, NULL},
};

View File

@ -3388,7 +3388,7 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
BKE_reportf(op->reports,
RPT_WARNING,
"%d x %s: %.4f ms, average: %.8f ms",
"%d \u00D7 %s: %.4f ms, average: %.8f ms",
iter_steps,
infostr,
time_delta,