diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-02-10 22:03:01 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-02-10 22:03:01 +0400 |
commit | 14a0ff90bc8b2d376ceb0b94c6724529754616b0 (patch) | |
tree | 28a0b68d4c53de7801ee76ea6bf129b462cd8357 /source/blender/windowmanager | |
parent | 8d4d27de9f0919c74fa629c287ba6678e79ce9a4 (diff) |
Fix a few DPI / retina draw issues:
* Color picker cursor was too small, and color cirle was not smooth enough.
* Border select gesture cross before first click did not reach to the border
of the window.
* Buttons were not drawing emboss properly (also for non-retina actually).
Note it doesn't draw entirely right for aligned buttons, but this was also
the case before it got broken.
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/intern/wm_gesture.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_gesture.c b/source/blender/windowmanager/intern/wm_gesture.c index 168c2312d9f..302bf61756a 100644 --- a/source/blender/windowmanager/intern/wm_gesture.c +++ b/source/blender/windowmanager/intern/wm_gesture.c @@ -309,17 +309,19 @@ static void wm_gesture_draw_lasso(wmGesture *gt) static void wm_gesture_draw_cross(wmWindow *win, wmGesture *gt) { rcti *rect = (rcti *)gt->customdata; - + int winsizex = WM_window_pixels_x(win); + int winsizey = WM_window_pixels_y(win); + glEnable(GL_LINE_STIPPLE); glColor3ub(96, 96, 96); glLineStipple(1, 0xCCCC); - sdrawline(rect->xmin - win->sizex, rect->ymin, rect->xmin + win->sizex, rect->ymin); - sdrawline(rect->xmin, rect->ymin - win->sizey, rect->xmin, rect->ymin + win->sizey); + sdrawline(rect->xmin - winsizex, rect->ymin, rect->xmin + winsizex, rect->ymin); + sdrawline(rect->xmin, rect->ymin - winsizey, rect->xmin, rect->ymin + winsizey); glColor3ub(255, 255, 255); glLineStipple(1, 0x3333); - sdrawline(rect->xmin - win->sizex, rect->ymin, rect->xmin + win->sizex, rect->ymin); - sdrawline(rect->xmin, rect->ymin - win->sizey, rect->xmin, rect->ymin + win->sizey); + sdrawline(rect->xmin - winsizex, rect->ymin, rect->xmin + winsizex, rect->ymin); + sdrawline(rect->xmin, rect->ymin - winsizey, rect->xmin, rect->ymin + winsizey); glDisable(GL_LINE_STIPPLE); } |