Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2020-01-10 16:23:47 +0300
committerJulian Eisel <eiseljulian@gmail.com>2020-01-10 16:28:11 +0300
commitaacdf55a50d8b9a0a95dd191a66deb7b58edca0b (patch)
tree6d91e2af4364791e106a074cc019f61c60f3cb0d /source/blender/makesdna/DNA_screen_types.h
parentc91ebcd7ab5ea1b284fcce96c9d62aa497356af8 (diff)
Cleanup: ARegion.sizex/y should not be used to access region size
This should only be used to change and recalculate region sizes in a DPI independent way. To get the size with DPI applied, ARegion.winx/y should be used instead. Added note on this in comment.
Diffstat (limited to 'source/blender/makesdna/DNA_screen_types.h')
-rw-r--r--source/blender/makesdna/DNA_screen_types.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_screen_types.h b/source/blender/makesdna/DNA_screen_types.h
index d3c5a707b44..60fb7b62dff 100644
--- a/source/blender/makesdna/DNA_screen_types.h
+++ b/source/blender/makesdna/DNA_screen_types.h
@@ -409,7 +409,9 @@ typedef struct ARegion {
short flag;
/** Current split size in unscaled pixels (if zero it uses regiontype).
- * To convert to pixels use: `UI_DPI_FAC * ar->sizex + 0.5f`. */
+ * To convert to pixels use: `UI_DPI_FAC * ar->sizex + 0.5f`.
+ * However to get the current region size, you should usually use winx/winy from above, not this!
+ */
short sizex, sizey;
/** Private, cached notifier events. */