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/editors | |
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/editors')
-rw-r--r-- | source/blender/editors/include/UI_resources.h | 4 | ||||
-rw-r--r-- | source/blender/editors/interface/resources.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_utils.c | 2 |
3 files changed, 7 insertions, 9 deletions
diff --git a/source/blender/editors/include/UI_resources.h b/source/blender/editors/include/UI_resources.h index 74991ad8ab1..ef0ae332fad 100644 --- a/source/blender/editors/include/UI_resources.h +++ b/source/blender/editors/include/UI_resources.h @@ -58,6 +58,8 @@ typedef enum ThemeColorID { // common colors among spaces TH_BACK, + /** Use when 'TH_SHOW_BACK_GRAD' is set (the lower, darker color). */ + TH_BACK_GRAD, TH_TEXT, TH_TEXT_HI, TH_TITLE, @@ -296,8 +298,6 @@ typedef enum ThemeColorID { TH_GIZMO_A, TH_GIZMO_B, - TH_LOW_GRAD, - TH_HIGH_GRAD, TH_SHOW_BACK_GRAD, TH_INFO_SELECTED, diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index 5f132295c04..3aadfeb5321 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -194,15 +194,13 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid) } cp = back; break; - case TH_LOW_GRAD: - cp = ts->gradients.gradient; - break; - case TH_HIGH_GRAD: - cp = ts->gradients.high_gradient; + case TH_BACK_GRAD: + cp = ts->back_grad; break; + case TH_SHOW_BACK_GRAD: cp = &setting; - setting = ts->gradients.show_grad; + setting = ts->show_back_grad; break; case TH_TEXT: if (theme_regionid == RGN_TYPE_WINDOW) diff --git a/source/blender/editors/space_view3d/view3d_utils.c b/source/blender/editors/space_view3d/view3d_utils.c index 540806d4b67..96f18ade149 100644 --- a/source/blender/editors/space_view3d/view3d_utils.c +++ b/source/blender/editors/space_view3d/view3d_utils.c @@ -88,7 +88,7 @@ void ED_view3d_background_color_get(const Scene *scene, const View3D *v3d, float return; } - UI_GetThemeColor3fv(TH_HIGH_GRAD, r_color); + UI_GetThemeColor3fv(TH_BACK, r_color); } void ED_view3d_cursor3d_calc_mat3(const Scene *scene, float mat[3][3]) |