Skip to content

Commit 0ff666f

Browse files
alex-vazquez-unity3dEvergreen
authored andcommitted
[Rendering Debugger]Fixes for Foldouts
1 parent 0fb5779 commit 0ff666f

2 files changed

Lines changed: 51 additions & 21 deletions

File tree

Packages/com.unity.render-pipelines.core/Editor/Debugging/DebugWindow.uss

Lines changed: 48 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,41 @@
6363

6464
/* Header Foldout */
6565

66-
.debug-window-foldout > .unity-foldout__toggle {
67-
border-width: 1px 0px 1px 0px;
66+
.debug-window-foldout-header > .unity-foldout__toggle {
67+
padding-top: 1px !important;
68+
padding-bottom: 1px !important;
6869
margin-top: 0px !important;
6970
margin-bottom: 0px !important;
71+
margin-left: -2px;
72+
margin-right: -4px;
73+
border-top-width: 1px;
7074
border-top-color: var(--unity-colors-default-border);
71-
border-bottom-color: var(--unity-colors-inspector_titlebar-border_accent);
75+
border-bottom-width: 1px;
76+
border-bottom-color: var(--unity-colors-default-border);
7277
background-color: var(--unity-colors-inspector_titlebar-background);
7378
}
7479

80+
.debug-window-foldout-header > .unity-foldout__toggle:hover {
81+
background-color: var(--unity-colors-inspector_titlebar-background-hover);
82+
}
83+
84+
.debug-window-foldout-header > .unity-foldout__toggle > .unity-toggle__input > .unity-toggle__checkmark
85+
{
86+
margin-left: 4px;
87+
margin-right: 4px;
88+
}
89+
90+
.debug-window-foldout-header .unity-foldout__text {
91+
-unity-font-style: bold;
92+
}
93+
94+
.debug-window-foldout > .unity-foldout__toggle {
95+
padding-top: 1px !important;
96+
padding-bottom: 1px !important;
97+
margin-top: 0px !important;
98+
margin-bottom: 0px !important;
99+
}
100+
75101
.debug-window-foldout > .unity-foldout__toggle:hover {
76102
background-color: var(--unity-colors-inspector_titlebar-background-hover);
77103
}
@@ -82,33 +108,35 @@
82108
margin-right: 4px;
83109
}
84110

85-
.more-options-button {
86-
background-image: var(--unity-icons-pane_options);
87-
background-size: contain;
88-
background-repeat: no-repeat;
89-
background-color: transparent;
90-
border-color: transparent;
91-
width: 16px;
92-
margin: 0px 4px 0px 0px !important;
93-
padding: 0px 0px 0px 0px !important;
111+
.debug-window-foldout .unity-foldout__text {
112+
-unity-font-style: bold;
94113
}
95114

96-
.more-options-button:hover {
97-
background-color: var(--unity-colors-button-background-hover);
115+
.more-options-button {
116+
background-image: var(--unity-icons-pane_options);
98117
}
99118

100-
.info-button {
119+
.info-button,
120+
.more-options-button {
101121
background-color: transparent;
102-
border-color: transparent;
103-
width: 24px;
104-
margin: 0px 4px 0px 0px !important;
105-
padding: 0px 0px 0px 0px !important;
122+
margin: 2px 2px 1px 3px;
123+
padding: 0px 2px 0px 0px;
124+
border-width: 0px;
125+
border-radius: 2px 2px 2px 2px;
126+
width: 20px;
127+
height: 20px;
106128
}
107129

108-
.info-button:hover {
130+
.info-button:hover,
131+
.more-options-button:hover{
109132
background-color: var(--unity-colors-button-background-hover);
110133
}
111134

135+
.info-button:disabled
136+
.info-button:disabled,
137+
.more-options-button:disabled {
138+
}
139+
112140
#debug-window-no-results-label {
113141
display: none;
114142
-unity-text-align: middle-center;

Packages/com.unity.render-pipelines.core/Runtime/Debugging/DebugUI.Containers.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,9 @@ protected override VisualElement Create()
246246
}
247247

248248
// Add special classes for styles
249-
container.AddToClassList("debug-window-foldout");
249+
// Use header style for top-level foldouts (not inside a Container), regular style for nested ones
250+
bool isHeaderFoldout = parent is DebugUI.Panel;
251+
container.AddToClassList(isHeaderFoldout ? "debug-window-foldout-header" : "debug-window-foldout");
250252
container.Q(className: "unity-foldout__text").AddToClassList("debug-window-search-filter-target");
251253

252254
// Update UI to match object's initial state

0 commit comments

Comments
 (0)