diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-08-08 10:06:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-08-09 11:02:10 +0300 |
commit | 00f22403ac9dce95117cb6ef5c948f1da881f05d (patch) | |
tree | d02eb2b0a6cb46e0b13a0d250456972c50f45d23 /source/blender/editors/space_view3d/view3d_manipulator_forcefield.c | |
parent | fdb1c81117a3595044d65aef5e6ecfafe30471e7 (diff) |
Manipulator: replace hard coded color w/ theme
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_manipulator_forcefield.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_manipulator_forcefield.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/view3d_manipulator_forcefield.c b/source/blender/editors/space_view3d/view3d_manipulator_forcefield.c index e3bfd0ac300..6a34f493caf 100644 --- a/source/blender/editors/space_view3d/view3d_manipulator_forcefield.c +++ b/source/blender/editors/space_view3d/view3d_manipulator_forcefield.c @@ -36,6 +36,8 @@ #include "ED_screen.h" #include "ED_manipulator_library.h" +#include "UI_resources.h" + #include "MEM_guardedalloc.h" #include "RNA_access.h" @@ -59,9 +61,6 @@ static bool WIDGETGROUP_forcefield_poll(const bContext *C, wmManipulatorGroupTyp static void WIDGETGROUP_forcefield_setup(const bContext *UNUSED(C), wmManipulatorGroup *mgroup) { - const float col[4] = {0.8f, 0.8f, 0.45f, 0.5f}; - const float col_hi[4] = {0.8f, 0.8f, 0.45f, 1.0f}; - /* only wind effector for now */ wmManipulatorWrapper *wwrapper = MEM_mallocN(sizeof(wmManipulatorWrapper), __func__); mgroup->customdata = wwrapper; @@ -71,8 +70,9 @@ static void WIDGETGROUP_forcefield_setup(const bContext *UNUSED(C), wmManipulato RNA_enum_set(mpr->ptr, "draw_options", ED_MANIPULATOR_ARROW_STYLE_CONSTRAINED); ED_manipulator_arrow3d_set_ui_range(mpr, -200.0f, 200.0f); ED_manipulator_arrow3d_set_range_fac(mpr, 6.0f); - WM_manipulator_set_color(mpr, col); - WM_manipulator_set_color_highlight(mpr, col_hi); + + UI_GetThemeColor3fv(TH_MANIPULATOR_PRIMARY, mpr->color); + UI_GetThemeColor3fv(TH_MANIPULATOR_HI, mpr->color_hi); } static void WIDGETGROUP_forcefield_refresh(const bContext *C, wmManipulatorGroup *mgroup) |