Fix T46180: Theme > UV Image editor > Scope Background does not have any effect

This commit is contained in:
Julian Eisel 2015-09-20 20:17:19 +02:00
parent 28da385ac2
commit cbeb76da95
Notes: blender-bot 2023-02-14 08:38:14 +01:00
Referenced by commit 982a06ac22, Fix UV editor scope background color not correct after theme reset
Referenced by issue #46180, Theme > UV Image editor > Scope Background does not have any effect
3 changed files with 14 additions and 7 deletions

View File

@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 276
#define BLENDER_SUBVERSION 0
#define BLENDER_SUBVERSION 1
/* Several breakages with 270, e.g. constraint deg vs rad */
#define BLENDER_MINVERSION 270
#define BLENDER_MINSUBVERSION 5

View File

@ -588,8 +588,8 @@ void ui_draw_but_HISTOGRAM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol)
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4f(0.f, 0.f, 0.f, 0.3f);
UI_ThemeColor4(TH_PREVIEW_BACK);
UI_draw_roundbox_corner_set(UI_CNR_ALL);
UI_draw_roundbox_gl_mode(GL_POLYGON, rect.xmin - 1, rect.ymin - 1, rect.xmax + 1, rect.ymax + 1, 3.0f);
@ -675,8 +675,8 @@ void ui_draw_but_WAVEFORM(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wcol),
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4f(0.f, 0.f, 0.f, 0.3f);
UI_ThemeColor4(TH_PREVIEW_BACK);
UI_draw_roundbox_corner_set(UI_CNR_ALL);
UI_draw_roundbox_gl_mode(GL_POLYGON, rect.xmin - 1, rect.ymin - 1, rect.xmax + 1, rect.ymax + 1, 3.0f);
@ -894,8 +894,8 @@ void ui_draw_but_VECTORSCOPE(ARegion *ar, uiBut *but, uiWidgetColors *UNUSED(wco
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glColor4f(0.f, 0.f, 0.f, 0.3f);
UI_ThemeColor4(TH_PREVIEW_BACK);
UI_draw_roundbox_corner_set(UI_CNR_ALL);
UI_draw_roundbox_gl_mode(GL_POLYGON, rect.xmin - 1, rect.ymin - 1, rect.xmax + 1, rect.ymax + 1, 3.0f);

View File

@ -2639,6 +2639,13 @@ void init_userdef_do_versions(void)
U.node_margin = 80;
}
if (!USER_VERSION_ATLEAST(276, 1)) {
bTheme *btheme;
for (btheme = U.themes.first; btheme; btheme = btheme->next) {
rgba_char_args_set_fl(btheme->tima.preview_back, 0.0f, 0.0f, 0.0f, 0.3f);
}
}
if (U.pixelsize == 0.0f)
U.pixelsize = 1.0f;