Commit: b555e07585015b89741b9783030913fdd68c23f1
Author: Campbell Barton
Date:   Sat Jun 22 09:54:49 2019 +1000
Branches: master
https://developer.blender.org/rBb555e07585015b89741b9783030913fdd68c23f1

Fix sub-panel UI offset

The offset for check-boxes in sub-panels wasn't being scaled correctly.

===================================================================

M       source/blender/editors/interface/interface_panel.c

===================================================================

diff --git a/source/blender/editors/interface/interface_panel.c 
b/source/blender/editors/interface/interface_panel.c
index 9c5ce0c9d2c..215b0c3c410 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -671,7 +671,7 @@ void ui_draw_aligned_panel(uiStyle *style,
 
   rcti titlerect = headrect;
   if (is_subpanel) {
-    titlerect.xmin += (0.7f * UI_UNIT_X);
+    titlerect.xmin += (0.7f * UI_UNIT_X) / block->aspect + 0.001f;
   }
 
   uint pos = GPU_vertformat_attr_add(immVertexFormat(), "pos", GPU_COMP_F32, 
2, GPU_FETCH_FLOAT);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to