Add runtime TextWidget size debugging to the Inspector
This commit is contained in:
parent
511da77d51
commit
98aee75b26
3 changed files with 45 additions and 17 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 20e512ecddb0612aa1ca9bbfe512a13401093f85
|
||||
Subproject commit c42218762da3a066c82049de13a496b1af5c4166
|
||||
48
Utilities/InspectForm.Designer.cs
generated
48
Utilities/InspectForm.Designer.cs
generated
|
|
@ -35,6 +35,7 @@
|
|||
this.tabPage2 = new System.Windows.Forms.TabPage();
|
||||
this.sceneTreeView = new System.Windows.Forms.TreeView();
|
||||
this.propertyGrid1 = new System.Windows.Forms.PropertyGrid();
|
||||
this.debugTextWidget = new System.Windows.Forms.CheckBox();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
|
|
@ -48,18 +49,19 @@
|
|||
//
|
||||
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
|
||||
this.splitContainer1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.splitContainer1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.debugTextWidget);
|
||||
this.splitContainer1.Panel1.Controls.Add(this.tabControl1);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.propertyGrid1);
|
||||
this.splitContainer1.Size = new System.Drawing.Size(831, 632);
|
||||
this.splitContainer1.SplitterDistance = 554;
|
||||
this.splitContainer1.Size = new System.Drawing.Size(913, 632);
|
||||
this.splitContainer1.SplitterDistance = 608;
|
||||
this.splitContainer1.SplitterWidth = 3;
|
||||
this.splitContainer1.TabIndex = 0;
|
||||
//
|
||||
|
|
@ -71,7 +73,7 @@
|
|||
this.tabControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.tabControl1.Name = "tabControl1";
|
||||
this.tabControl1.SelectedIndex = 0;
|
||||
this.tabControl1.Size = new System.Drawing.Size(554, 632);
|
||||
this.tabControl1.Size = new System.Drawing.Size(608, 632);
|
||||
this.tabControl1.TabIndex = 1;
|
||||
this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
|
||||
//
|
||||
|
|
@ -80,8 +82,8 @@
|
|||
this.tabPage1.Controls.Add(this.aggTreeView);
|
||||
this.tabPage1.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage1.Name = "tabPage1";
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(546, 606);
|
||||
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage1.Size = new System.Drawing.Size(600, 606);
|
||||
this.tabPage1.TabIndex = 0;
|
||||
this.tabPage1.Text = "SystemWindow";
|
||||
this.tabPage1.UseVisualStyleBackColor = true;
|
||||
|
|
@ -93,9 +95,9 @@
|
|||
this.aggTreeView.FullRowSelect = true;
|
||||
this.aggTreeView.HideSelection = false;
|
||||
this.aggTreeView.Location = new System.Drawing.Point(3, 3);
|
||||
this.aggTreeView.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.aggTreeView.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.aggTreeView.Name = "aggTreeView";
|
||||
this.aggTreeView.Size = new System.Drawing.Size(540, 600);
|
||||
this.aggTreeView.Size = new System.Drawing.Size(594, 600);
|
||||
this.aggTreeView.TabIndex = 1;
|
||||
this.aggTreeView.DrawNode += new System.Windows.Forms.DrawTreeNodeEventHandler(this.AggTreeView_DrawNode);
|
||||
this.aggTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.AggTreeView_AfterSelect);
|
||||
|
|
@ -105,8 +107,8 @@
|
|||
this.tabPage2.Controls.Add(this.sceneTreeView);
|
||||
this.tabPage2.Location = new System.Drawing.Point(4, 22);
|
||||
this.tabPage2.Name = "tabPage2";
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(547, 606);
|
||||
this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
|
||||
this.tabPage2.Size = new System.Drawing.Size(546, 606);
|
||||
this.tabPage2.TabIndex = 1;
|
||||
this.tabPage2.Text = "Scene";
|
||||
this.tabPage2.UseVisualStyleBackColor = true;
|
||||
|
|
@ -118,9 +120,9 @@
|
|||
this.sceneTreeView.FullRowSelect = true;
|
||||
this.sceneTreeView.HideSelection = false;
|
||||
this.sceneTreeView.Location = new System.Drawing.Point(3, 3);
|
||||
this.sceneTreeView.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.sceneTreeView.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.sceneTreeView.Name = "sceneTreeView";
|
||||
this.sceneTreeView.Size = new System.Drawing.Size(541, 600);
|
||||
this.sceneTreeView.Size = new System.Drawing.Size(540, 600);
|
||||
this.sceneTreeView.TabIndex = 2;
|
||||
this.sceneTreeView.DrawNode += new System.Windows.Forms.DrawTreeNodeEventHandler(this.SceneTreeView_DrawNode);
|
||||
this.sceneTreeView.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.SceneTreeView_AfterSelect);
|
||||
|
|
@ -130,22 +132,35 @@
|
|||
this.propertyGrid1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.propertyGrid1.LineColor = System.Drawing.SystemColors.ControlDark;
|
||||
this.propertyGrid1.Location = new System.Drawing.Point(0, 0);
|
||||
this.propertyGrid1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.propertyGrid1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.propertyGrid1.Name = "propertyGrid1";
|
||||
this.propertyGrid1.Size = new System.Drawing.Size(274, 632);
|
||||
this.propertyGrid1.Size = new System.Drawing.Size(302, 632);
|
||||
this.propertyGrid1.TabIndex = 0;
|
||||
this.propertyGrid1.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.propertyGrid1_PropertyValueChanged);
|
||||
//
|
||||
// debugTextWidget
|
||||
//
|
||||
this.debugTextWidget.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.debugTextWidget.AutoSize = true;
|
||||
this.debugTextWidget.Location = new System.Drawing.Point(489, 3);
|
||||
this.debugTextWidget.Name = "debugTextWidget";
|
||||
this.debugTextWidget.Size = new System.Drawing.Size(116, 17);
|
||||
this.debugTextWidget.TabIndex = 2;
|
||||
this.debugTextWidget.Text = "Debug TextWidget";
|
||||
this.debugTextWidget.UseVisualStyleBackColor = true;
|
||||
this.debugTextWidget.CheckedChanged += new System.EventHandler(this.debugTextWidget_CheckedChanged);
|
||||
//
|
||||
// InspectForm
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(831, 632);
|
||||
this.ClientSize = new System.Drawing.Size(913, 632);
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
|
||||
this.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.Name = "InspectForm";
|
||||
this.Text = "InspectForm";
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel1.PerformLayout();
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
|
|
@ -165,5 +180,6 @@
|
|||
private System.Windows.Forms.TreeView aggTreeView;
|
||||
private System.Windows.Forms.TabPage tabPage2;
|
||||
private System.Windows.Forms.TreeView sceneTreeView;
|
||||
private System.Windows.Forms.CheckBox debugTextWidget;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -477,5 +477,17 @@ namespace MatterHackers.MatterControl
|
|||
scene.DebugItem = null;
|
||||
}
|
||||
}
|
||||
|
||||
private void debugTextWidget_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
TextWidget.DebugShowSize = debugTextWidget.Checked;
|
||||
|
||||
|
||||
foreach(var widget in this.inspectedSystemWindow.Descendants<TextWidget>())
|
||||
{
|
||||
widget.Invalidate();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue