From afdae7f6703ff7b43316eb362ed84233abd21d90 Mon Sep 17 00:00:00 2001 From: Chandler Cox Date: Thu, 23 May 2024 16:51:31 -0500 Subject: [PATCH] Only size ui widgets based on viewscale and not control size. --- Source/Editor/Gizmo/UIEditorGizmo.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Source/Editor/Gizmo/UIEditorGizmo.cs b/Source/Editor/Gizmo/UIEditorGizmo.cs index 26cf02972..3fa574e1b 100644 --- a/Source/Editor/Gizmo/UIEditorGizmo.cs +++ b/Source/Editor/Gizmo/UIEditorGizmo.cs @@ -626,9 +626,6 @@ namespace FlaxEditor var viewScale = ViewScale; if (viewScale < 0.7f) widgetSize *= viewScale; - var controlSize = control.Size.Absolute.MinValue / 50.0f; - if (controlSize < 1.0f) - widgetSize *= Mathf.Clamp(controlSize + 0.1f, 0.1f, 1.0f); var widgetHandleSize = new Float2(widgetSize); DrawControlWidget(uiControl, ref ul, ref mousePos, ref widgetHandleSize, viewScale, new Float2(-1, -1), CursorType.SizeNWSE); DrawControlWidget(uiControl, ref ur, ref mousePos, ref widgetHandleSize, viewScale, new Float2(1, -1), CursorType.SizeNESW); @@ -647,7 +644,7 @@ namespace FlaxEditor } } - private void DrawControlWidget(UIControl uiControl, ref Float2 pos, ref Float2 mousePos, ref Float2 size,float scale, Float2 resizeAxis, CursorType cursor) + private void DrawControlWidget(UIControl uiControl, ref Float2 pos, ref Float2 mousePos, ref Float2 size, float scale, Float2 resizeAxis, CursorType cursor) { var style = Style.Current; var rect = new Rectangle((pos + resizeAxis * 10 * scale) - size * 0.5f, size);