Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/windowmanager/intern/wm_dragdrop.c')
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index 0581000e07c..0b58009ebcc 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -40,7 +40,9 @@
#include "BLI_blenlib.h"
-#include "BIF_gl.h"
+#include "GPU_compatibility.h"
+#include "GPU_colors.h"
+
#include "BIF_glutil.h"
#include "BKE_blender.h"
@@ -257,13 +259,12 @@ void wm_drags_check_ops(bContext *C, wmEvent *event)
static void wm_drop_operator_draw(const char *name, int x, int y)
{
int width = UI_GetStringWidth(name);
-
- glColor4ub(0, 0, 0, 50);
-
+
+ gpuCurrentColor4x(CPACK_BLACK, 0.196f);
uiSetRoundBox(UI_CNR_ALL | UI_RB_ALPHA);
uiRoundBox(x, y, x + width + 8, y + 15, 4);
-
- glColor4ub(255, 255, 255, 255);
+
+ gpuCurrentColor3x(CPACK_WHITE);
UI_DrawString(x + 4, y + 4, name);
}
@@ -322,7 +323,7 @@ void wm_drags_draw(bContext *C, wmWindow *win, rcti *rect)
if (rect)
drag_rect_minmax(rect, x, y, x + drag->sx, y + drag->sy);
else {
- glColor4f(1.0, 1.0, 1.0, 0.65); /* this blends texture */
+ gpuCurrentColor4x(CPACK_WHITE, 0.650f); /* this blends texture */
glaDrawPixelsTexScaled(x, y, drag->imb->x, drag->imb->y, GL_UNSIGNED_BYTE, drag->imb->rect, drag->scale, drag->scale);
}
}
@@ -352,7 +353,7 @@ void wm_drags_draw(bContext *C, wmWindow *win, rcti *rect)
drag_rect_minmax(rect, x, y, x + w, y + 16);
}
else {
- glColor4ub(255, 255, 255, 255);
+ gpuCurrentColor3x(CPACK_WHITE);
UI_DrawString(x, y, wm_drag_name(drag));
}