浏览代码

Minor style changes to fix spacing between node controls

Also removes some leftover toolbar styles
/main
Peter Bay Bastian 7 年前
当前提交
0b1d9efe
共有 2 个文件被更改,包括 18 次插入41 次删除
  1. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs
  2. 54
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/MaterialGraph.uss

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs


if (m_PreviewContainer != null)
m_ControlsDivider.PlaceBehind(m_PreviewContainer);
}
if (m_ControlsContainer.childCount == 0)
m_ControlsContainer.RemoveFromClassList("notEmpty");
else
m_ControlsContainer.AddToClassList("notEmpty");
}
void UpdateSize()

54
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/MaterialGraph.uss


background-color: #393939;
}
MaterialNodeView #controls.notEmpty {
padding-top: 4;
padding-bottom: 4;
}
MaterialNodeView #previewContainer > #preview {
width: 200;
height: 200;

padding-bottom: 2;
}
ToolbarView {
flex-direction: row;
border-color: rgb(32, 32, 32);
border-bottom-width: 1;
}
ToolbarSeparatorView {
background-color: rgb(32, 32, 32);
width: 1;
}
ToolbarSpaceView {
width: 5;
}
ToolbarButtonView {
font-size: 10;
text-color: rgb(180, 180, 180);
padding-top: 3;
padding-bottom: 3;
padding-left: 4;
padding-right: 4;
}
ToolbarButtonView:hover {
background-color: rgba(255, 255, 255, 0.25);
}
ToolbarButtonView:active {
background-color: rgba(0, 0, 0, 0.25);
}
ColorControlView {
flex-direction: row;
}

padding-left: 8;
padding-right: 8;
padding-top: 8;
padding-bottom: 8;
padding-top: 4;
padding-bottom: 4;
}
MultiFloatControlView > #dummy > Label {

flex: 1;
margin-left: 0;
margin-right: 8;
margin-top: 8;
margin-bottom: 8;
margin-top: 4;
margin-bottom: 4;
}
EnumControlView > Label {

padding-bottom: 0;
margin-left: 8;
margin-right: 8;
margin-top: 8;
margin-bottom: 8;
margin-top: 4;
margin-bottom: 4;
padding-top: 8;
padding-bottom: 8;
padding-top: 4;
padding-bottom: 4;
}
FloatField {

正在加载...
取消
保存