diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-18 04:17:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-18 04:17:15 +0300 |
commit | 9085fb8073ea645f9f69cc0353334df15921e2e9 (patch) | |
tree | b5809d58b0a44315689187cb1cae5643b8bc3fce /source | |
parent | e157573fab2ad818b20ed869279004ebcf5670f9 (diff) |
Cleanup: expand UserDef pixel-size & DPI documentation
Avoid misunderstandings with UI scaling.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index a632d42fd8b..15fe1619ca4 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -689,16 +689,17 @@ typedef struct UserDef { int audioformat; int audiochannels; - /** Setting for UI scale. */ + /** Setting for UI scale (fractional), before screen DPI has been applied. */ float ui_scale; /** Setting for UI line width. */ int ui_line_width; /** Runtime, full DPI divided by `pixelsize`. */ int dpi; - /** Runtime, multiplier to scale UI elements based on DPI. */ + /** Runtime, multiplier to scale UI elements based on DPI (fractional). */ float dpi_fac; + /** Runtime, `1.0 / dpi_fac` */ float inv_dpi_fac; - /** Runtime, line width and point size based on DPI. */ + /** Runtime, calculated from line-width and point-size based on DPI (rounded to int). */ float pixelsize; /** Deprecated, for forward compatibility. */ int virtual_pixel; |