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:
authorCampbell Barton <ideasman42@gmail.com>2021-10-27 05:59:43 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-10-27 07:55:36 +0300
commit0d155f274ff2ca2dcf52745e32f17c05a9d1c890 (patch)
treeee9c9424475e4dfa9ee3e46182958b4684957f78 /source/blender/editors/interface
parenta3b785bc083f3d83198c402e00da9d610389ca98 (diff)
Docs: add docstring for wmWindowManger.winactive
Also justify rounding up font width.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_style.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 2a1cdfd447c..92a9f14c77d 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -400,6 +400,8 @@ int UI_fontstyle_string_width_with_block_aspect(const uiFontStyle *fs,
int width = UI_fontstyle_string_width(fs, str);
if (aspect != 1.0f) {
+ /* While in most cases rounding up isn't important, it can make a difference
+ * with small fonts (3px or less), zooming out in the node-editor for e.g. */
width = (int)ceilf(width * aspect);
}
return width;