Skip to content

Commit

Permalink
revery icon changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mjkkirschner committed Jan 15, 2025
1 parent d24ce54 commit 7d5c375
Showing 1 changed file with 41 additions and 40 deletions.
81 changes: 41 additions & 40 deletions src/DynamoCoreWpf/Views/Core/NodeView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
xmlns:dp="clr-namespace:Dynamo.Properties;assembly=DynamoCore"
xmlns:controls="clr-namespace:Dynamo.Views"
xmlns:fa="clr-namespace:FontAwesome5;assembly=FontAwesome5.Net" xmlns:dp1="clr-namespace:Dynamo.Properties;assembly=DynamoCore"
xmlns:po="http://schemas.microsoft.com/winfx/2006/xaml/presentation/options"
Name="topControl"
Width="Auto"
Height="Auto"
Expand All @@ -20,13 +19,6 @@
PreviewMouseLeftButtonDown="OnPreviewMouseLeftButtonDown"
PreviewMouseMove="OnNodeViewMouseMove">

<UserControl.Resources>
<BitmapImage
po:Freeze="true"
RenderOptions.BitmapScalingMode="LowQuality"
x:Key="defaultIcon"
UriSource="/DynamoCoreWpf;component/UI/Images/default-node-icon.png" />
</UserControl.Resources>

<Grid Name="grid"
HorizontalAlignment="Left"
Expand Down Expand Up @@ -328,12 +320,25 @@
Name="nodeIcon"
Width="34"
Height="34">
<Rectangle.Fill>
<ImageBrush
RenderOptions.BitmapScalingMode="LowQuality"
ImageSource="{Binding ImageSource, FallbackValue={StaticResource defaultIcon}, TargetNullValue={StaticResource defaultIcon}}"
Stretch="UniformToFill" />
</Rectangle.Fill>
<Rectangle.Style>
<Style TargetType="Rectangle">
<Setter Property="Fill">
<Setter.Value>
<ImageBrush ImageSource="{Binding ImageSource}" Stretch="UniformToFill" />
</Setter.Value>
</Setter>
<Style.Triggers>
<!-- If no icon can be found, use default icon -->
<DataTrigger Binding="{Binding ImageSource, UpdateSourceTrigger=PropertyChanged}" Value="{x:Null}">
<Setter Property="Fill">
<Setter.Value>
<ImageBrush ImageSource="/DynamoCoreWpf;component/UI/Images/default-node-icon.png" Stretch="UniformToFill" />
</Setter.Value>
</Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</Rectangle.Style>
</Rectangle>

<TextBlock Name="NameBlock"
Expand Down Expand Up @@ -464,8 +469,6 @@
<Grid x:Name="FrozenGlyph"
Visibility="{Binding Path=IsFrozen, Converter={StaticResource BooleanToVisibilityCollapsedConverter}, Mode=OneWay}">
<Image x:Name="FrozenImage"
po:Freeze="true"
RenderOptions.BitmapScalingMode="LowQuality"
Width="16px"
Height="16px"
HorizontalAlignment="Center"
Expand All @@ -476,8 +479,6 @@
<Grid x:Name="HiddenEyeGlyph"
Visibility="{Binding Path=IsVisible, Converter={StaticResource InverseBoolToVisibilityCollapsedConverter}, Mode=OneWay}">
<Image x:Name="HiddenEyeImage"
po:Freeze="true"
RenderOptions.BitmapScalingMode="LowQuality"
Width="16px"
Height="16px"
HorizontalAlignment="Center"
Expand Down Expand Up @@ -547,7 +548,6 @@
Background="Transparent"
CornerRadius="2" />
<Image x:Name="DotsImage"
RenderOptions.BitmapScalingMode="LowQuality"
Width="16px"
Height="16px"
Margin="1.5,0,0,0"
Expand Down Expand Up @@ -655,47 +655,48 @@
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>

<Image
Stretch="Uniform"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
Grid.Row="0"
Grid.ColumnSpan="2"
<UniformGrid Grid.Row="0"
Margin="0 10 0 -10"
RenderOptions.BitmapScalingMode="LowQuality"
Columns="1" Rows="1" Name="ZoomGlyphRowZero"
HorizontalAlignment="Center" VerticalAlignment="Bottom"
Visibility="{Binding ImgGlyphThreeSource, Converter={StaticResource EmptyToVisibilityCollapsedConverter}, UpdateSourceTrigger=PropertyChanged}">
<Image Stretch="Uniform" HorizontalAlignment="Center" VerticalAlignment="Bottom"
x:Name="ZoomStateImgOne"
Width="64"
Source="{Binding ImgGlyphThreeSource, UpdateSourceTrigger=PropertyChanged, TargetNullValue={x:Null}}"
Visibility="{Binding ImgGlyphThreeSource,Converter={StaticResource EmptyToVisibilityCollapsedConverter}, UpdateSourceTrigger=PropertyChanged}" />

<WrapPanel
Grid.Row="1"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<Image
</UniformGrid>
<Grid Grid.Row="1"
Margin="0 0 0 0"
Name="ZoomGlyphRowOne"
HorizontalAlignment="Center" VerticalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="{Binding ImgGlyphOneSource, Mode=OneWay, Converter={StaticResource EmptyToZeroLengthConverter}, UpdateSourceTrigger=PropertyChanged}" />
<ColumnDefinition Width="{Binding ImgGlyphTwoSource, Mode=OneWay, Converter={StaticResource EmptyToZeroLengthConverter}, UpdateSourceTrigger=PropertyChanged}" />
</Grid.ColumnDefinitions>
<Image Grid.Column="0"

x:Name="ZoomStateImgTwo"
Stretch="Uniform"
RenderOptions.BitmapScalingMode="LowQuality"
HorizontalAlignment="Left"
VerticalAlignment="Center"
HorizontalAlignment="Left" VerticalAlignment="Center"


Margin="5 0 "
Width="64"
Source="{Binding ImgGlyphOneSource, UpdateSourceTrigger=PropertyChanged, TargetNullValue={x:Null}}"
Visibility="{Binding ImgGlyphOneSource, Converter={StaticResource EmptyToVisibilityCollapsedConverter}, UpdateSourceTrigger=PropertyChanged}" />

<Image
x:Name="ZoomStateImgThree"
<Image Grid.Column="1"
x:Name="ZoomStateImgThree"
Stretch="Uniform"
RenderOptions.BitmapScalingMode="LowQuality"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Margin="5 0"
Width="64"
Source="{Binding ImgGlyphTwoSource, UpdateSourceTrigger=PropertyChanged, TargetNullValue={x:Null}}"
Visibility="{Binding ImgGlyphTwoSource, Converter={StaticResource EmptyToVisibilityCollapsedConverter}, UpdateSourceTrigger=PropertyChanged}" />
</WrapPanel>
</Grid>
</Grid>

<!-- Displays when the node is selected -->
<Border Name="selectionBorder"
Grid.Row="1"
Expand Down

0 comments on commit 7d5c375

Please sign in to comment.