diff options
author | Ton Roosendaal <ton@blender.org> | 2012-12-14 19:09:59 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2012-12-14 19:09:59 +0400 |
commit | 0990c84f3f31d34eedd3cd72b0e706e9d80ffdf9 (patch) | |
tree | 2cd7f1bf059a1b13f98477d820be7e73fe50be79 /source/blender/editors/screen | |
parent | fec6b9d89d45b08bcdea639760f77edf17b99dc3 (diff) |
Fixes for correct UI scaling display:
- Move to layer (and more popups) didn't scale yet
- User Prefs and render window now open on right location on Mac Retinas
- Brush sizes for painting now scale for Mac Retina
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/screen_ops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c index 807c5a4c457..d819176e542 100644 --- a/source/blender/editors/screen/screen_ops.c +++ b/source/blender/editors/screen/screen_ops.c @@ -3419,8 +3419,9 @@ static int userpref_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *ev sizey = 480; /* some magic to calculate postition */ - rect.xmin = event->x + CTX_wm_window(C)->posx - sizex / 2; - rect.ymin = event->y + CTX_wm_window(C)->posy - sizey / 2; + /* pixelsize: mouse coords are in U.pixelsize units :/ */ + rect.xmin = (event->x / U.pixelsize) + CTX_wm_window(C)->posx - sizex / 2; + rect.ymin = (event->y / U.pixelsize) + CTX_wm_window(C)->posy - sizey / 2; rect.xmax = rect.xmin + sizex; rect.ymax = rect.ymin + sizey; |