UI: Fix UIList item using "regular" widget colors while edited

Simply removing the check for `UI_STATE_TEXT_INPUT` makes it inherit
the "List Item" User Interface theme settings. This patch changes the
default theme to match the colors of text input fields.

#### Master
{F11680556, size=full}

#### This patch
{F11680557, size=full}

All the included commmunity themes seem to work well (only Deep Grey might
need more contrast but that's a different patch).

Related reports: T92720

Reviewed By: #user_interface, Severin

Maniphest Tasks: T92720

Differential Revision: https://developer.blender.org/D13073
This commit is contained in:
Pablo Vazquez 2021-11-04 15:31:48 +01:00 committed by Pablo Vazquez
parent be4478d1f8
commit 9e71a07547
Notes: blender-bot 2023-02-14 11:21:40 +01:00
Referenced by issue #92720, UI: Some Values have too bright selection since new UI
2 changed files with 2 additions and 2 deletions

View File

@ -187,7 +187,7 @@ const bTheme U_theme_default = {
.outline = RGBA(0x2d2d2dff),
.inner = RGBA(0x2d2d2d00),
.inner_sel = RGBA(0x484a4fff),
.item = RGBA(0xb3b3b3ff),
.item = RGBA(0x4772b3ff),
.text = RGBA(0xccccccff),
.text_sel = RGBA(0xffffffff),
.roundness = 0.2f,

View File

@ -2526,7 +2526,7 @@ static void widget_state(uiWidgetType *wt, int state, int drawflag, eUIEmbossTyp
{
uiWidgetStateColors *wcol_state = wt->wcol_state;
if ((state & UI_BUT_LIST_ITEM) && !(state & UI_STATE_TEXT_INPUT)) {
if (state & UI_BUT_LIST_ITEM) {
/* Override default widget's colors. */
bTheme *btheme = UI_GetTheme();
wt->wcol_theme = &btheme->tui.wcol_list_item;