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/blenkernel/intern | |
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/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/brush.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c index f310895f590..3e5dee5b0de 100644 --- a/source/blender/blenkernel/intern/brush.c +++ b/source/blender/blenkernel/intern/brush.c @@ -39,6 +39,7 @@ #include "DNA_color_types.h" #include "DNA_scene_types.h" #include "DNA_object_types.h" +#include "DNA_userdef_types.h" #include "DNA_windowmanager_types.h" #include "WM_types.h" @@ -51,6 +52,7 @@ #include "BLI_rand.h" #include "BLI_utildefines.h" +#include "BKE_blender.h" #include "BKE_brush.h" #include "BKE_colortools.h" #include "BKE_global.h" @@ -644,8 +646,9 @@ void BKE_brush_size_set(Scene *scene, Brush *brush, int size) int BKE_brush_size_get(const Scene *scene, Brush *brush) { UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings; - - return (ups->flag & UNIFIED_PAINT_SIZE) ? ups->size : brush->size; + int size = (ups->flag & UNIFIED_PAINT_SIZE) ? ups->size : brush->size; + + return (int)((float)size * U.pixelsize); } int BKE_brush_use_locked_size(const Scene *scene, Brush *brush) |