diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-01-11 04:59:19 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-01-11 04:59:19 +0300 |
commit | 5c6d5cb8639aa71e2728258e9a4afe7c9d822bc7 (patch) | |
tree | 6633ee4150ef2246ffa8ced974f1b883d1d4bb44 /source/blender/draw/intern | |
parent | f98e4cbedbb73d22b649275208e0318838dea089 (diff) |
Fix background color use in 3D view
TH_BACK was being used when drawing the 3D view even though
there was no way to set the color in the preferences.
The color was zero'd when moving to the new 2.8x theme.
Having both gradient and background colors was confusing,
especially having to use 'TH_HIGH_GRAD' for the 3D view, 'TH_BACK' for
other views.
Move the background color back to 'TH_BACK', 'TH_BACK_GRAD' is used
when gradients are enabled.
RNA is unchanged so presets don't need updating.
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r-- | source/blender/draw/intern/draw_common.c | 4 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_view.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c index 6514e4baaf3..c0e735b02a6 100644 --- a/source/blender/draw/intern/draw_common.c +++ b/source/blender/draw/intern/draw_common.c @@ -60,8 +60,8 @@ void DRW_globals_update(void) UI_GetThemeColor4fv(TH_WIRE_EDIT, ts.colorWireEdit); UI_GetThemeColor4fv(TH_ACTIVE, ts.colorActive); UI_GetThemeColor4fv(TH_SELECT, ts.colorSelect); - UI_GetThemeColorBlend4f(TH_SELECT, TH_HIGH_GRAD, 0.66f, ts.colorDupliSelect); - UI_GetThemeColorBlend4f(TH_WIRE, TH_HIGH_GRAD, 0.66f, ts.colorDupli); + UI_GetThemeColorBlend4f(TH_SELECT, TH_BACK, 0.5f, ts.colorDupliSelect); + UI_GetThemeColorBlend4f(TH_WIRE, TH_BACK, 0.5f, ts.colorDupli); UI_COLOR_RGBA_FROM_U8(0x88, 0xFF, 0xFF, 155, ts.colorLibrarySelect); UI_COLOR_RGBA_FROM_U8(0x55, 0xCC, 0xCC, 155, ts.colorLibrary); UI_GetThemeColor4fv(TH_TRANSFORM, ts.colorTransform); diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c index 4c53049e772..5f4b22c572b 100644 --- a/source/blender/draw/intern/draw_view.c +++ b/source/blender/draw/intern/draw_view.c @@ -95,8 +95,8 @@ void DRW_draw_background(void) immBindBuiltinProgram(GPU_SHADER_2D_SMOOTH_COLOR_DITHER); - UI_GetThemeColor3ubv(TH_LOW_GRAD, col_lo); - UI_GetThemeColor3ubv(TH_HIGH_GRAD, col_hi); + UI_GetThemeColor3ubv(TH_BACK_GRAD, col_lo); + UI_GetThemeColor3ubv(TH_BACK, col_hi); immBegin(GPU_PRIM_TRI_FAN, 4); immAttr3ubv(color, col_lo); @@ -118,7 +118,7 @@ void DRW_draw_background(void) } else { /* Solid background Color */ - UI_ThemeClearColorAlpha(TH_HIGH_GRAD, 1.0f); + UI_ThemeClearColorAlpha(TH_BACK, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); } } |