Skip to content

Commit

Permalink
Dummy Node Remove Color Overlays (#12743)
Browse files Browse the repository at this point in the history
* Dummy Node Remove Color Overlays

Removed some of the styling elements fighting visually with the Dummy Node. This node is used for Unresolved or Deprecated nodes and does not require any visual candy to function.

* Dummy Node Recover Frozen State

- reverted change where frozen overlay in zoomed-in state will be removed
  • Loading branch information
dnenov authored Mar 30, 2022
1 parent d3aa1ec commit b4f5964
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Media.Imaging;
Expand All @@ -24,12 +25,19 @@ public void CustomizeView(DummyNode model, Dynamo.Controls.NodeView nodeView)
Width = 66.0,
Height = 66.0,
Stretch = Stretch.UniformToFill,
HorizontalAlignment = HorizontalAlignment.Center,
VerticalAlignment = VerticalAlignment.Center,
Source = new BitmapImage(new Uri(src, UriKind.Relative))
};
RenderOptions.SetBitmapScalingMode(dummyNodeImage, BitmapScalingMode.HighQuality);

nodeView.inputGrid.Children.Add(dummyNodeImage);
model.Warning(model.GetDescription(), true);

// Grid containing the State overlay Glyphs in Zoomed Out state
// Remove so only the 'paperclip' icon appears
UIElement child = nodeView.grid.FindName("zoomGlyphsGrid") as UIElement;
if (child != null) nodeView.grid.Children.Remove(child);
}

public void Dispose()
Expand Down

0 comments on commit b4f5964

Please sign in to comment.