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:
authorHarley Acheson <harley>2019-04-04 02:25:43 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-04-04 02:27:42 +0300
commit0e78e3038d024a112e2caccc0539a62c44bb18ef (patch)
treec31f29364829782e74360ae4319e443182ae521c /source/blender/editors/screen
parent3464a534770b551c60f43e422024712d0947cd81 (diff)
Separation lines for Quad View
Reviewers: brecht, billreynish, fclem Reviewed By: billreynish, fclem Differential Revision: https://developer.blender.org/D4633
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/area.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index e599f3b7ed3..886f2781312 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -535,12 +535,23 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
if (sa) {
const bScreen *screen = WM_window_get_active_screen(win);
- /* Only draw region emboss for top-bar and quad-view. */
+ /* Only region emboss for top-bar */
if ((screen->state != SCREENFULL) && ED_area_is_global(sa)) {
region_draw_emboss(ar, &ar->winrct, (REGION_EMBOSS_LEFT | REGION_EMBOSS_RIGHT));
}
else if ((ar->regiontype == RGN_TYPE_WINDOW) && (ar->alignment == RGN_ALIGN_QSPLIT)) {
- region_draw_emboss(ar, &ar->winrct, REGION_EMBOSS_ALL);
+
+ /* draw separating lines between the quad views */
+
+ float color[4] = { 0.0f, 0.0f, 0.0f, 0.8f };
+ UI_GetThemeColor3fv(TH_EDITOR_OUTLINE, color);
+ GPUVertFormat *format = immVertexFormat();
+ uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
+ immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
+ immUniformColor4fv(color);
+ GPU_line_width(1.0f);
+ imm_draw_box_wire_2d(pos, 0, 0, ar->winrct.xmax - ar->winrct.xmin + 1, ar->winrct.ymax - ar->winrct.ymin + 1);
+ immUnbindProgram();
}
}