From 60e35be2d4ca9713b8a135d38d624ba3068a5dc6 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 17 Dec 2012 17:37:48 +0000 Subject: UI fixes: - on setting lower DPI, the regions that were scrolled down would start moving down 1 pixel on every draw. Caused by rounding error. (int + 0.1 vs int -0.1) (Ancient bug) - circles used in outliner - to denote selection/active - now draw bigger, and better centered. (2.66 fix only) --- source/blender/editors/screen/area.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/screen') diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index d9fbfe4bd91..e5ffbab91ea 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -1703,7 +1703,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char * v2d->keepofs &= ~(V2D_LOCKOFS_Y | V2D_KEEPOFS_X); v2d->scroll |= V2D_SCROLL_HORIZONTAL_HIDE; v2d->scroll &= ~V2D_SCROLL_VERTICAL_HIDE; - + /* ensure tot is set correctly, to keep views on bottons, with sliders */ y = min_ii(y, v2d->cur.ymin); y = -y; @@ -1724,8 +1724,8 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char * y = -y; } - /* +V2D_SCROLL_HEIGHT is workaround to set the actual height */ - UI_view2d_totRect_set(v2d, x + V2D_SCROLL_WIDTH, y + V2D_SCROLL_HEIGHT); + /* +V2D_SCROLL_HEIGHT is workaround to set the actual height (needs to be int) */ + UI_view2d_totRect_set(v2d, x + (int)V2D_SCROLL_WIDTH, y + (int)V2D_SCROLL_HEIGHT); /* set the view */ UI_view2d_view_ortho(v2d); -- cgit v1.2.3