UI: Add Icons to Represent Error Conditions

This PR adds three SVG Icons. One to represent that an icon is not
found - ICON_NOT_FOUND - so represent when an out-of-range value was
used to specify an icon. The second - ICON_CHAR_NOTDEF - is to
represent that a text character is not found in the specified font or
font stack. The third - ICON_CHAR_REPLACEMENT - is to indicate the
portion of a text string that contains invalid bytes.

Pull Request: https://projects.blender.org/blender/blender/pulls/134008
This commit is contained in:
Harley Acheson
2025-02-19 01:11:24 +01:00
committed by Harley Acheson
parent 0dce68333f
commit e850a09762
5 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1 @@
<svg id="svg1" height="1700" viewBox="0 0 1250 1700" width="1250" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"><sodipodi:namedview pagecolor="#303030" showgrid="true"><inkscape:grid id="grid5" units="px" spacingx="100" spacingy="100" color="#4772b3" opacity="0.2" visible="true" /></sodipodi:namedview><path id="path1" d="m177.58991 1378.5458 294.49475-428.47686-294.49475-423.43874zm70.28339 145.3936h599.87241l-299.7161-440.7694zm380.25257-573.87046 294.07436 431.60186v-855.0406zm220.92128-568.34616h-601.17385l298.59381 438.37055zm-799.107825-1.9269c0-72.65498 56.125625-131.60148 125.303845-131.60148h751.82283c69.17834 0 120.6159 58.9465 120.6159 131.60148v1140.54622c0 72.655-51.43756 131.6014-120.6159 131.6014h-751.82283c-69.17822 0-125.303845-58.9464-125.303845-131.6014z" fill="#fff" stroke-width="2.6753"/></svg>

After

Width:  |  Height:  |  Size: 943 B

View File

@@ -0,0 +1 @@
<svg id="svg1" height="1600" width="1400" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"><sodipodi:namedview pagecolor="#303030" showgrid="true"><inkscape:grid id="grid5" units="px" spacingx="100" spacingy="100" color="#4772b3" opacity="0.2" visible="true" /></sodipodi:namedview><path id="path1" d="m1203.2354 988.47694-549.81602 550.25616-549.81604-550.25616 549.81604-550.25693zm-353.82258-139.18281q0-74.44619-54.98193-123.96975-54.98155-49.52307-133.8961-49.52307-95.08601 0-165.59174 29.13111l-11.6434 115.87783q53.68807-34.31006 118.37233-34.31006 48.51333 0 80.20847 26.54169 31.6952 26.54171 31.6952 69.91504 0 47.2577-54.65813 119.43808-54.65818 72.1804-54.65818 147.2741h98.32011q0-34.9572 38.16381-82.2147 64.68428-80.27195 70.50573-89.9825 38.16383-60.85219 38.16383-128.17777zm-120.95969 506.88327v-135.9456h-150.06746v135.9456z" fill="#fff" stroke-width="5.50037"/></svg>

After

Width:  |  Height:  |  Size: 1003 B

View File

@@ -0,0 +1 @@
<svg id="svg8" fill="none" height="1600" viewBox="0 0 48 48" width="1600" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"><sodipodi:namedview pagecolor="#303030" showgrid="true"><inkscape:grid id="grid5" units="px" spacingx="100" spacingy="100" color="#ffffff" opacity="0.2" visible="true" /></sodipodi:namedview><g fill="#fff"><path id="path1-1" d="m5.9972213 3.0020547c-2.808152.0030853-3.0063786.1357382-3.0059938 3.0082759l.00482 35.9875574c.0004394 3.280005.5216064 3.013264 2.989982 3.012574l36.0186395-.010072c2.358112-.000659 2.980726-1.199828 2.980981-2.983596l-.008138-36.0091685c-.000488-2.1594139-.629553-3.0477066-2.992106-3.0451109z" fill-opacity=".17817" stroke-linecap="round" stroke-linejoin="round" stroke-width="5.41905"/><g id="g9" fill-opacity=".664526"><path id="path8" d="m43.488281 35.960937c-.828427 0-1.5.671573-1.5 1.5v4.541016h-10.478515c-.828427 0-1.5.671573-1.5 1.5s.671573 1.5 1.5 1.5h10.49512c2.142046.01468 2.983312-1.025851 2.990775-2.998155l-.0074-4.542861c-.0013-.828426-.671573-1.5-1.5-1.5z"/><path id="path1" d="m23.998047 10.539063c-.828427 0-1.5.671573-1.5 1.5v17.691406c0 .828427.671573 1.5 1.5 1.5s1.5-.671573 1.5-1.5v-17.691406c0-.828427-.671573-1.5-1.5-1.5z"/><path id="path2" d="m24.017578 34.080078a1.95 1.95 0 0 0 -1.380859.564453l-.02344.02344a1.95 1.95 0 0 0 -.01172 2.757812 1.95 1.95 0 0 0 2.757813.01367l.02344-.02539a1.95 1.95 0 0 0 .01172-2.757812 1.95 1.95 0 0 0 -1.376953-.576172z"/><path id="path3" d="m4.5039062 3.0078125a1.50015 1.50015 0 0 0 -1.4999999 1.5v5.9843755a1.5 1.5 0 0 0 1.4999999 1.5 1.5 1.5 0 0 0 1.5-1.5v-4.4843755h10.4960938a1.5 1.5 0 0 0 1.5-1.5 1.5 1.5 0 0 0 -1.5-1.5z"/><path id="path4" d="m4.515625 19.505859a1.5 1.5 0 0 0 -1.5 1.5v6a1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5-1.5v-6a1.5 1.5 0 0 0 -1.5-1.5z"/><path id="path5" d="m43.494141 19.486328a1.5 1.5 0 0 0 -1.5 1.5v6.011719a1.5 1.5 0 0 0 1.5 1.5 1.5 1.5 0 0 0 1.5-1.5v-6.011719a1.5 1.5 0 0 0 -1.5-1.5z"/><path id="path6" d="m31.505859 2.9707031c-.828427 0-1.5.6715729-1.5 1.5s.671573 1.5 1.5 1.5h10.488282v4.5332029c0 .828427.671573 1.5 1.5 1.5s1.5-.671573 1.5-1.5v-4.5055276c-.000083-1.9206438-.509245-3.0423526-2.990775-3.0276753z"/><path id="path7" d="m4.5058594 36.007812a1.5 1.5 0 0 0 -1.5 1.5v6.00586a1.50015 1.50015 0 0 0 1.5 1.5h11.9882816a1.5 1.5 0 0 0 1.5-1.5 1.5 1.5 0 0 0 -1.5-1.5h-10.4882816v-4.50586a1.5 1.5 0 0 0 -1.5-1.5z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -234,6 +234,8 @@ if(WITH_BLENDER)
cancel
cancel_large
center_only
char_notdef
char_replacement
checkbox_dehlt
checkbox_hlt
checkmark
@@ -640,6 +642,7 @@ if(WITH_BLENDER)
normals_face
normals_vertex
normals_vertex_face
not_found
object_data
object_datamode
object_hidden

View File

@@ -40,6 +40,11 @@
/* ICON_NONE has to be the first item here because it is hard-coded in places as 0. */
DEF_ICON(NONE)
/* Keep these here, in this order. Their IDs should be static. */
DEF_ICON(CHAR_NOTDEF)
DEF_ICON(CHAR_REPLACEMENT)
DEF_ICON(NOT_FOUND)
/* Blank is no real icon, but used as placeholder or spacers,
* it takes the space of an icon but is empty. */
DEF_ICON(BLANK1)