diff options
author | Pablo Vazquez <pablovazquez> | 2021-11-05 18:22:48 +0300 |
---|---|---|
committer | Pablo Vazquez <pablo@blender.org> | 2021-11-05 18:23:22 +0300 |
commit | 7c755293330e8ebe8717b0a34e6031b4e3186f0d (patch) | |
tree | 6edb6f9dff18c7b8917f58385c2a79e0be0b01af /source/blender/editors/interface | |
parent | 87e2154dafaaa389c200213894f09a3d951a0409 (diff) |
UI: Use arrow icon on context paths
The current `ICON_SMALL_TRI_RIGHT_VEC` uses dark hard-coded colors ([`0.2`, `0.2`, `0.2`])
which makes it impossible to theme and hard to see in dark contexts.
Use `ICON_RIGHTARROW` to match the Outliner's breadcrumbs. This icon uses `TH_TEXT` so it's visible as long as the rest of the text is.
##### Master
(Properties editor background made red on purpose to be able to see the triangle icon)
{F11713038, size=full}
#### This patch
{F11713039, size=full}
Reviewed By: #user_interface, Severin, HooglyBoogly
Maniphest Tasks: T92771
Differential Revision: https://developer.blender.org/D13106
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_icons.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c index c20129b4184..5784af90834 100644 --- a/source/blender/editors/interface/interface_icons.c +++ b/source/blender/editors/interface/interface_icons.c @@ -259,31 +259,6 @@ static void viconutil_set_point(int pt[2], int x, int y) pt[1] = y; } -static void vicon_small_tri_right_draw(int x, int y, int w, int UNUSED(h), float alpha) -{ - int pts[3][2]; - const int cx = x + w / 2 - 4; - const int cy = y + w / 2; - const int d = w / 5, d2 = w / 7; - - viconutil_set_point(pts[0], cx - d2, cy + d); - viconutil_set_point(pts[1], cx - d2, cy - d); - viconutil_set_point(pts[2], cx + d2, cy); - - uint pos = GPU_vertformat_attr_add( - immVertexFormat(), "pos", GPU_COMP_I32, 2, GPU_FETCH_INT_TO_FLOAT); - immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR); - immUniformColor4f(0.2f, 0.2f, 0.2f, alpha); - - immBegin(GPU_PRIM_TRIS, 3); - immVertex2iv(pos, pts[0]); - immVertex2iv(pos, pts[1]); - immVertex2iv(pos, pts[2]); - immEnd(); - - immUnbindProgram(); -} - static void vicon_keytype_draw_wrapper( int x, int y, int w, int h, float alpha, short key_type, short handle_type) { @@ -982,8 +957,6 @@ static void init_internal_icons(void) } } - def_internal_vicon(ICON_SMALL_TRI_RIGHT_VEC, vicon_small_tri_right_draw); - def_internal_vicon(ICON_KEYTYPE_KEYFRAME_VEC, vicon_keytype_keyframe_draw); def_internal_vicon(ICON_KEYTYPE_BREAKDOWN_VEC, vicon_keytype_breakdown_draw); def_internal_vicon(ICON_KEYTYPE_EXTREME_VEC, vicon_keytype_extreme_draw); |