Skip to content

Commit fcde269

Browse files
julienamsellemEvergreen
authored andcommitted
[VFX] Prevent the context title from overlapping the space toggle button
1 parent c22bd6a commit fcde269

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

Packages/com.unity.visualeffectgraph/Editor/GraphView/Elements/VFXContextUI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public VFXContextUI() : base("uxml/VFXContext")
284284
m_FlowOutputConnectorContainer = this.Q("flow-outputs");
285285

286286
m_HeaderIcon = titleContainer.Q<Image>("icon");
287-
m_HeaderSpace = titleContainer.Q<Label>("header-space");
287+
m_HeaderSpace = mainContainer.Q<Label>("header-space");
288288
m_HeaderSpace.AddManipulator(new Clickable(OnSpace));
289289
m_Subtitle = this.Q<Label>("subtitle");
290290

Packages/com.unity.visualeffectgraph/Editor/UIResources/uss/VFXContext.uss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,11 @@ VFXContextUI #inside
124124

125125
VFXContextUI .extremity
126126
{
127+
max-width: 280px;
128+
overflow: hidden;
127129
border-radius: 2px;
128130
justify-content:center;
129-
align-items:center;
131+
align-self: center;
130132
flex-direction:row;
131133
}
132134

@@ -162,6 +164,7 @@ VFXContextUI #node-border > #inside > #title > #title-label
162164

163165
VFXContextUI #title #icon
164166
{
167+
flex-shrink: 0;
165168
--unity-image: url("project:///Packages/com.unity.visualeffectgraph/Editor/UIResources/VFX/Execution.png");
166169
margin-right: 6px;
167170
}

Packages/com.unity.visualeffectgraph/Editor/UIResources/uss/VFXNode.uss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,15 @@ VFXBlockUI.node #node-border > #title > Label.first {
122122
}
123123

124124
#title Label {
125+
text-overflow: ellipsis;
126+
overflow: hidden;
125127
align-self: center;
126128
}
127129

130+
#title Label.first {
131+
flex-shrink: 1;
132+
}
133+
128134
.setting {
129135
align-self: center;
130136
margin-left: 4px;

Packages/com.unity.visualeffectgraph/Editor/UIResources/uxml/VFXContext.uxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<ui:VisualElement name="title" pickingMode="Ignore" class="extremity">
55
<ui:Image name="icon" text=""/>
66
<ui:Label name="title-label" text="" />
7-
<ui:Label name="header-space" text="" />
87
</ui:VisualElement>
8+
<ui:Label name="header-space" text="" />
99
<ui:Label name="subtitle" pickingMode="Ignore" text="" class="subtitle" />
1010
<ui:VisualElement name="user-title" pickingMode="Ignore">
1111
<ui:Label name="user-label" text="" tooltip="Double click to edit"/>

0 commit comments

Comments
 (0)