diff options
author | Ton Roosendaal <ton@blender.org> | 2012-12-17 21:37:48 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2012-12-17 21:37:48 +0400 |
commit | 60e35be2d4ca9713b8a135d38d624ba3068a5dc6 (patch) | |
tree | 44afa72b38a176328aa6b41f609ce47900c37266 /source/blender/editors/interface/view2d.c | |
parent | c9f0e29f3cc6ef5c757d08c57e561a1ad551066d (diff) |
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)
Diffstat (limited to 'source/blender/editors/interface/view2d.c')
-rw-r--r-- | source/blender/editors/interface/view2d.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c index a5f9995df88..306b328b431 100644 --- a/source/blender/editors/interface/view2d.c +++ b/source/blender/editors/interface/view2d.c @@ -852,10 +852,11 @@ void UI_view2d_totRect_set_resize(View2D *v2d, int width, int height, int resize /* hrumf! */ /* XXX: there are work arounds for this in the panel and file browse code. */ + /* round to int, because this is called with width + V2D_SCROLL_WIDTH */ if (scroll & V2D_SCROLL_HORIZONTAL) - width -= V2D_SCROLL_WIDTH; + width -= (int)V2D_SCROLL_WIDTH; if (scroll & V2D_SCROLL_VERTICAL) - height -= V2D_SCROLL_HEIGHT; + height -= (int)V2D_SCROLL_HEIGHT; if (ELEM(0, width, height)) { if (G.debug & G_DEBUG) |