Fix T47324: Edit-text in list view theme glitch

Use existing text select colors when text matches select color.
This commit is contained in:
Campbell Barton
2016-02-05 02:57:53 +11:00
parent e7e9613fe6
commit 55dcdb9bd7
2 changed files with 17 additions and 2 deletions

View File

@@ -1867,10 +1867,10 @@ static struct uiWidgetColors wcol_list_item = {
{0, 0, 0, 255},
{0, 0, 0, 0},
{86, 128, 194, 255},
{0, 0, 0, 255},
{90, 90, 90, 255},
{0, 0, 0, 255},
{0, 0, 0, 255},
{255, 255, 255, 255},
0,
0, 0

View File

@@ -2694,6 +2694,21 @@ void init_userdef_do_versions(void)
}
}
/**
* Include next version bump.
*
* (keep this block even if it becomes empty).
*/
{
bTheme *btheme;
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
if (memcmp(btheme->tui.wcol_list_item.item, btheme->tui.wcol_list_item.text_sel, sizeof(char) * 3) == 0) {
copy_v4_v4_char(btheme->tui.wcol_list_item.item, btheme->tui.wcol_text.item);
copy_v4_v4_char(btheme->tui.wcol_list_item.text_sel, btheme->tui.wcol_text.text_sel);
}
}
}
if (U.pixelsize == 0.0f)
U.pixelsize = 1.0f;