[Bf-blender-cvs] [057f2a1878a] blender2.8: UI: use backdrop circle for navigation icons, make clickable area bigger.

Brecht Van Lommel noreply at git.blender.org
Mon Oct 1 17:36:09 CEST 2018


Commit: 057f2a1878ac1160c0c2154a29954e55762ddb5f
Author: Brecht Van Lommel
Date:   Mon Oct 1 12:47:37 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB057f2a1878ac1160c0c2154a29954e55762ddb5f

UI: use backdrop circle for navigation icons, make clickable area bigger.

This will look a bit better once the icon outline is gone.

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

M	source/blender/editors/space_view3d/view3d_gizmo_navigate.c

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

diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
index 4eee7251022..63c15c7fe5d 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
@@ -51,13 +51,13 @@
  * \{ */
 
 /* Offset from screen edge. */
-#define GIZMO_OFFSET_FAC 1.1f
+#define GIZMO_OFFSET_FAC 1.2f
 /* Size of main icon. */
 #define GIZMO_SIZE 80
-/* Size of the smaller icons. */
-#define GIZMO_ICON_SIZE 20
+/* Factor for size of smaller button. */
+#define GIZMO_MINI_FAC 0.35f
 /* How much mini buttons offset from the primary. */
-#define GIZMO_MINI_OFFSET_FAC 0.32f
+#define GIZMO_MINI_OFFSET_FAC 0.38f
 
 
 enum {
@@ -162,11 +162,11 @@ static void WIDGETGROUP_navigate_setup(const bContext *UNUSED(C), wmGizmoGroup *
 
 
 		/* may be overwritten later */
-		gz->scale_basis = (GIZMO_ICON_SIZE) / 2;
+		gz->scale_basis = (GIZMO_SIZE * GIZMO_MINI_FAC) / 2;
 		if (info->icon != 0) {
 			PropertyRNA *prop = RNA_struct_find_property(gz->ptr, "icon");
 			RNA_property_enum_set(gz->ptr, prop, info->icon);
-			RNA_enum_set(gz->ptr, "draw_options", ED_GIZMO_BUTTON_SHOW_OUTLINE);
+			RNA_enum_set(gz->ptr, "draw_options", ED_GIZMO_BUTTON_SHOW_OUTLINE | ED_GIZMO_BUTTON_SHOW_BACKDROP);
 		}
 
 		wmOperatorType *ot = WM_operatortype_find(info->opname, true);



More information about the Bf-blender-cvs mailing list