UI: Theme: Allow transparency when editing text in widgets
Allow transparency in both text and background color, to allow blending the selected color with whatever is underneath. Making theming more flexible, especially since the same property is used in different backgrounds. Note: this doesn't affect the default themes since all of them have the alpha component in inner at `1.0`. Pull Request: https://projects.blender.org/blender/blender/pulls/112090
This commit is contained in:
parent
42ed81b9ab
commit
2ec2e52a90
|
@ -1988,7 +1988,6 @@ static void widget_draw_text(const uiFontStyle *fstyle,
|
|||
/* We are drawing on top of widget bases. Flush cache. */
|
||||
GPU_blend(GPU_BLEND_ALPHA);
|
||||
UI_widgetbase_draw_cache_flush();
|
||||
GPU_blend(GPU_BLEND_NONE);
|
||||
|
||||
if (but->selsta >= but->ofs) {
|
||||
selsta_draw = BLF_width(fstyle->uifont_id, drawstr + but->ofs, but->selsta - but->ofs);
|
||||
|
@ -2016,6 +2015,7 @@ static void widget_draw_text(const uiFontStyle *fstyle,
|
|||
selection_shape.ymax);
|
||||
|
||||
immUnbindProgram();
|
||||
GPU_blend(GPU_BLEND_NONE);
|
||||
|
||||
#ifdef WITH_INPUT_IME
|
||||
/* IME candidate window uses selection position. */
|
||||
|
|
Loading…
Reference in New Issue