Skip to content

Commit d3eae07

Browse files
authored
FIX: Select dropdown menu for Path in Input Actions Editor from any position in Path button (#2114)
1 parent 4c3ce7e commit d3eae07

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ however, it has to be formatted properly to pass verification tests.
1717
- Fixed an issue causing InvalidOperationException when entering playmode with domain reload disabled. [ISXB-1208](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1208).
1818
- Fixed an issue where compiling Addressables with Input System package present would result in failed compilation due to `IInputAnalytic.TryGatherData` not being defined [ISXB-1203](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1203).
1919
- Pinned Touch Samples sample package dependencies to avoid errors with Cinemachine 3.x and Probuilder 6.x. [ISXB-1245](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1245)
20+
- Fixed an issue where dropdown menu for Path in Input Actions Editor could not be selected from any button position. [ISXB-1309](https://issuetracker.unity3d.com/product/unity/issues/guid/ISXB-1309)
2021

2122
## [1.12.0] - 2025-01-15
2223

Packages/com.unity.inputsystem/InputSystem/Editor/ControlPicker/InputControlPathEditor.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,17 @@ public void OnGUI(Rect rect, GUIContent label = null, SerializedProperty propert
9696

9797
var lineRect = rect;
9898
var labelRect = lineRect;
99-
labelRect.width = EditorGUIUtility.labelWidth;
99+
labelRect.width = EditorStyles.label.CalcSize(pathLabel).x + 20; // Fit to label with some padding
100100
EditorGUI.LabelField(labelRect, pathLabel);
101101
lineRect.x += labelRect.width;
102102
lineRect.width -= labelRect.width;
103103

104104
var bindingTextRect = lineRect;
105105
var editButtonRect = lineRect;
106106

107-
var bindingTextRectOffset = 80;
108-
bindingTextRect.width += bindingTextRectOffset;
109-
bindingTextRect.x -= bindingTextRectOffset + 20;
110-
editButtonRect.x = bindingTextRect.x + bindingTextRect.width; // Place it directly after the textRect
107+
bindingTextRect.x = labelRect.x + labelRect.width; // Place directly after labelRect
108+
editButtonRect.x += lineRect.width - 20; // Place at the edge of the window to appear after bindingTextRect
109+
bindingTextRect.width = editButtonRect.x - bindingTextRect.x; // bindingTextRect fills remaining space between label and editButton
111110
editButtonRect.width = 20;
112111
editButtonRect.height = 15;
113112

0 commit comments

Comments
 (0)