Fix T48654: outline text visible while renaming
Both button and rename text would draw while renaming, caused issues with some themes.
This commit is contained in:
parent
e0db647d35
commit
3c64696972
Notes:
blender-bot
2023-02-14 07:49:12 +01:00
Referenced by issue #48654, Text in outliner is still visible during renaming Referenced by issue #48657, Incorrect render with Cycles (CPU) using texture
|
@ -1579,11 +1579,19 @@ static void outliner_draw_tree_element(
|
|||
glDisable(GL_BLEND);
|
||||
|
||||
/* name */
|
||||
if (active == OL_DRAWSEL_NORMAL) UI_ThemeColor(TH_TEXT_HI);
|
||||
else if (ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) UI_ThemeColorBlend(TH_BACK, TH_TEXT, 0.75f);
|
||||
else UI_ThemeColor(TH_TEXT);
|
||||
|
||||
UI_fontstyle_draw_simple(fstyle, startx + offsx, *starty + 5 * ufac, te->name);
|
||||
if ((tselem->flag & TSE_TEXTBUT) == 0) {
|
||||
if (active == OL_DRAWSEL_NORMAL) {
|
||||
UI_ThemeColor(TH_TEXT_HI);
|
||||
}
|
||||
else if (ELEM(tselem->type, TSE_RNA_PROPERTY, TSE_RNA_ARRAY_ELEM)) {
|
||||
UI_ThemeColorBlend(TH_BACK, TH_TEXT, 0.75f);
|
||||
}
|
||||
else {
|
||||
UI_ThemeColor(TH_TEXT);
|
||||
}
|
||||
|
||||
UI_fontstyle_draw_simple(fstyle, startx + offsx, *starty + 5 * ufac, te->name);
|
||||
}
|
||||
|
||||
offsx += (int)(UI_UNIT_X + UI_fontstyle_string_width(fstyle, te->name));
|
||||
|
||||
|
|
Loading…
Reference in New Issue