Improve layout of new tool tips
Fix issue with openGL not having glGenBuffers
This commit is contained in:
parent
f520399de2
commit
dc949d72cd
5 changed files with 36 additions and 9 deletions
|
|
@ -45,8 +45,16 @@ namespace MatterHackers.GCodeVisualizer
|
|||
|
||||
public GCodeVertexBuffer(int[] indexData, ColorVertexData[] colorData)
|
||||
{
|
||||
GL.GenBuffers(1, out vertexID);
|
||||
GL.GenBuffers(1, out indexID);
|
||||
try
|
||||
{
|
||||
throw new Exception();
|
||||
GL.GenBuffers(1, out vertexID);
|
||||
GL.GenBuffers(1, out indexID);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Set vertex data
|
||||
vertexLength = colorData.Length;
|
||||
|
|
@ -79,6 +87,12 @@ namespace MatterHackers.GCodeVisualizer
|
|||
|
||||
public void RenderRange(int offset, int count)
|
||||
{
|
||||
if (vertexID == 0)
|
||||
{
|
||||
// not allocated don't render
|
||||
return;
|
||||
}
|
||||
|
||||
GL.EnableClientState(ArrayCap.ColorArray);
|
||||
GL.EnableClientState(ArrayCap.NormalArray);
|
||||
GL.EnableClientState(ArrayCap.VertexArray);
|
||||
|
|
@ -115,6 +129,12 @@ namespace MatterHackers.GCodeVisualizer
|
|||
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (vertexID == 0)
|
||||
{
|
||||
// not allocated don't dispose
|
||||
return;
|
||||
}
|
||||
|
||||
// release unmanaged resources
|
||||
if (!disposed)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -301,6 +301,7 @@ namespace MatterHackers.MatterControl
|
|||
private void DebugMenus_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
PopupWidget.DebugKeepOpen = debugMenus.Checked;
|
||||
ToolTipManager.DebugKeepOpen = debugMenus.Checked;
|
||||
}
|
||||
|
||||
private void SceneTreeView_AfterSelect(object sender, TreeViewEventArgs e)
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
var toolTipPopover = new ClickablePopover(ArrowDirection.Up, new BorderDouble(0, 0), 7, 0);
|
||||
|
||||
var markdownWidegt = new MarkdownWidget(Theme)
|
||||
var markdownWidegt = new MarkdownWidget(Theme, false)
|
||||
{
|
||||
HAnchor = HAnchor.Absolute,
|
||||
VAnchor = VAnchor.Fit,
|
||||
|
|
@ -228,7 +228,7 @@ namespace MatterHackers.MatterControl
|
|||
markdownWidegt.Markdown = toolTipText;
|
||||
markdownWidegt.Width = 350;
|
||||
var maxLineWidth = markdownWidegt.Descendants<ParagraphX>().Max(i => i.MaxLineWidth);
|
||||
markdownWidegt.Width = maxLineWidth + 30;
|
||||
markdownWidegt.Width = maxLineWidth + 15;
|
||||
|
||||
return markdownWidegt;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,10 +62,16 @@ namespace Markdig.Agg
|
|||
this.theme = theme;
|
||||
this.HAnchor = HAnchor.Stretch;
|
||||
this.ScrollArea.HAnchor = HAnchor.Stretch;
|
||||
this.ScrollArea.Margin = new BorderDouble(0, 0, 15, 0);
|
||||
|
||||
this.VAnchor = scrollContent ? VAnchor.Stretch : VAnchor.Fit;
|
||||
this.ScrollArea.VAnchor = scrollContent ? VAnchor.Fit : VAnchor.Fit;
|
||||
this.ScrollArea.VAnchor = VAnchor.Fit;
|
||||
if (scrollContent)
|
||||
{
|
||||
this.VAnchor = VAnchor.Stretch;
|
||||
this.ScrollArea.Margin = new BorderDouble(0, 0, 15, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.VAnchor = VAnchor.Fit;
|
||||
}
|
||||
|
||||
var lastScroll = this.TopLeftOffset;
|
||||
this.ScrollPositionChanged += (s, e) =>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit db169f730fbb4e5b5792f1fa28ed472d424e7097
|
||||
Subproject commit 779d00997e34eab7e2981e14bc8d91056b43e9aa
|
||||
Loading…
Add table
Add a link
Reference in a new issue