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
path: root/source
diff options
context:
space:
mode:
authorHarley Acheson <harley>2019-05-01 18:18:33 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-05-01 18:21:02 +0300
commit0a80be40e3b1a513b18d2c1e7a95346de7bad7d2 (patch)
treeeabe3b8a191af08d44693e6e4ee2f4758e8d5012 /source
parentdf712d74a25b70446e2efccf47d23cbbde299a9a (diff)
UI: make outliner hierarchy line width take into account DPI
Differential Revision: https://developer.blender.org/D4744
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c
index a46f72a28e7..d5762fc9dde 100644
--- a/source/blender/editors/space_outliner/outliner_draw.c
+++ b/source/blender/editors/space_outliner/outliner_draw.c
@@ -2382,7 +2382,7 @@ static void outliner_draw_hierarchy_lines_recursive(unsigned pos,
if ((te->flag & TE_CHILD_NOT_IN_COLLECTION) == 0) {
/* Horizontal Line? */
if (tselem->type == 0 && (te->idcode == ID_OB || te->idcode == ID_SCE)) {
- immRecti(pos, startx, *starty, startx + UI_UNIT_X, *starty - 1);
+ immRecti(pos, startx, *starty, startx + UI_UNIT_X, *starty - U.pixelsize);
/* Vertical Line? */
if (te->idcode == ID_OB) {
@@ -2397,7 +2397,7 @@ static void outliner_draw_hierarchy_lines_recursive(unsigned pos,
/* Horizontal line - dashed. */
int start = startx;
for (int i = 0; i < dash.steps_num; i++) {
- immRecti(pos, start, *starty, start + dash.step_len - dash.gap_len, *starty - 1);
+ immRecti(pos, start, *starty, start + dash.step_len - dash.gap_len, *starty - U.pixelsize);
start += dash.step_len;
}
@@ -2423,7 +2423,7 @@ static void outliner_draw_hierarchy_lines_recursive(unsigned pos,
/* Vertical line. */
te = te_vertical_line_last;
if ((te != NULL) && (te->parent || lb->first != lb->last)) {
- immRecti(pos, startx, y1 + UI_UNIT_Y, startx + 1, y2);
+ immRecti(pos, startx, y1 + UI_UNIT_Y, startx + U.pixelsize, y2);
}
/* Children that are not in the collection are always in the end of the subtree.
@@ -2433,7 +2433,7 @@ static void outliner_draw_hierarchy_lines_recursive(unsigned pos,
const int steps_num = ((y1_dashed + UI_UNIT_Y) - y2_dashed) / dash.step_len;
int start = y1_dashed + UI_UNIT_Y;
for (int i = 0; i < steps_num; i++) {
- immRecti(pos, startx, start, startx + 1, start - dash.step_len + dash.gap_len);
+ immRecti(pos, startx, start, startx + U.pixelsize, start - dash.step_len + dash.gap_len);
start -= dash.step_len;
}
}
@@ -2634,7 +2634,7 @@ static void outliner_draw_tree(bContext *C,
// gray hierarchy lines
starty = (int)ar->v2d.tot.ymax - UI_UNIT_Y / 2 - OL_Y_OFFSET;
- startx = UI_UNIT_X / 2 - 1.0f;
+ startx = UI_UNIT_X / 2 - (U.pixelsize + 1) / 2;
outliner_draw_hierarchy_lines(soops, &soops->tree, startx, &starty);
// items themselves