[Bf-blender-cvs] [9085fb8073e] blender-v2.90-release: Cleanup: expand UserDef pixel-size & DPI documentation
Campbell Barton
noreply at git.blender.org
Tue Aug 18 04:23:56 CEST 2020
Commit: 9085fb8073ea645f9f69cc0353334df15921e2e9
Author: Campbell Barton
Date: Tue Aug 18 11:17:15 2020 +1000
Branches: blender-v2.90-release
https://developer.blender.org/rB9085fb8073ea645f9f69cc0353334df15921e2e9
Cleanup: expand UserDef pixel-size & DPI documentation
Avoid misunderstandings with UI scaling.
===================================================================
M source/blender/makesdna/DNA_userdef_types.h
===================================================================
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;
More information about the Bf-blender-cvs
mailing list