Remove dedicated title edit row, merge with Editor SectionWidget
This commit is contained in:
parent
2e1ac70f68
commit
7c29214d20
1 changed files with 16 additions and 13 deletions
|
|
@ -68,19 +68,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
this.scene = scene;
|
||||
this.printer = printer;
|
||||
|
||||
this.AddChild(inlineTitleEdit = new InlineTitleEdit("", theme, "Object Name")
|
||||
{
|
||||
Border = new BorderDouble(bottom: 1),
|
||||
BorderColor = theme.GetBorderColor(50)
|
||||
});
|
||||
inlineTitleEdit.TitleChanged += (s, e) =>
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
item.Name = inlineTitleEdit.Text;
|
||||
}
|
||||
};
|
||||
|
||||
this.ContentPanel = new FlowLayoutWidget(FlowDirection.TopToBottom)
|
||||
{
|
||||
HAnchor = HAnchor.Stretch,
|
||||
|
|
@ -197,7 +184,23 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
Padding = new BorderDouble(top: 10)
|
||||
});
|
||||
|
||||
inlineTitleEdit = new InlineTitleEdit("", theme, "Object Name");
|
||||
inlineTitleEdit.TitleChanged += (s, e) =>
|
||||
{
|
||||
if (item != null)
|
||||
{
|
||||
item.Name = inlineTitleEdit.Text;
|
||||
}
|
||||
};
|
||||
|
||||
editorSection = new SectionWidget("Editor", editorColumn, theme, serializationKey: UserSettingsKey.EditorPanelExpanded, defaultExpansion: true);
|
||||
|
||||
// TODO: Replace hackery with practical solution
|
||||
if (editorSection.Children.FirstOrDefault() is ExpandCheckboxButton checkbox)
|
||||
{
|
||||
checkbox.ReplaceChild(checkbox.Children[1], inlineTitleEdit);
|
||||
}
|
||||
|
||||
this.ContentPanel.AddChild(editorSection);
|
||||
|
||||
var colorSection = new SectionWidget(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue