1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

UI - Properly make use of ArtemisIcon where needed

This commit is contained in:
Robert 2021-04-12 22:38:34 +02:00
parent dd54a8a54c
commit 8d75d0dd8c
7 changed files with 34 additions and 27 deletions

View File

@ -1,9 +1,10 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"> xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared">
<DataTemplate x:Key="SimpleLayerBrushDescriptorTemplate"> <DataTemplate x:Key="SimpleLayerBrushDescriptorTemplate">
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<materialDesign:PackIcon Kind="{Binding Icon}" Height="13" Width="13" Margin="0 1 3 0" /> <shared:ArtemisIcon Icon="{Binding Icon}" Height="13" Width="13" Margin="0 1 3 0" />
<TextBlock Text="{Binding DisplayName}" /> <TextBlock Text="{Binding DisplayName}" />
</StackPanel> </StackPanel>
</DataTemplate> </DataTemplate>
@ -17,7 +18,7 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<materialDesign:PackIcon Grid.Row="0" Grid.RowSpan="2" Kind="{Binding Icon}" Height="20" Width="20" Margin="-5 -2 10 0" VerticalAlignment="Center" /> <shared:ArtemisIcon Grid.Row="0" Grid.RowSpan="2" Icon="{Binding Icon}" Height="20" Width="20" Margin="-5 -2 10 0" VerticalAlignment="Center" />
<TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding DisplayName}" TextWrapping="Wrap" MaxWidth="350" /> <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding DisplayName}" TextWrapping="Wrap" MaxWidth="350" />
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Description}" TextWrapping="Wrap" MaxWidth="350" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}" /> <TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding Description}" TextWrapping="Wrap" MaxWidth="350" Foreground="{DynamicResource MaterialDesignNavigationItemSubheader}" />
</Grid> </Grid>

View File

@ -8,6 +8,7 @@
xmlns:s="https://github.com/canton7/Stylet" xmlns:s="https://github.com/canton7/Stylet"
xmlns:behaviors="clr-namespace:Artemis.UI.Behaviors" xmlns:behaviors="clr-namespace:Artemis.UI.Behaviors"
xmlns:layerEffect="clr-namespace:Artemis.Core.LayerEffects;assembly=Artemis.Core" xmlns:layerEffect="clr-namespace:Artemis.Core.LayerEffects;assembly=Artemis.Core"
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance local:EffectsViewModel}"> d:DataContext="{d:DesignInstance local:EffectsViewModel}">
@ -38,7 +39,7 @@
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<materialDesign:PackIcon Kind="{Binding Icon}" Width="20" Height="20" VerticalAlignment="Center" /> <shared:ArtemisIcon Icon="{Binding Icon}" Width="20" Height="20" VerticalAlignment="Center" />
<StackPanel Margin="8 0 0 0" Grid.Column="1" VerticalAlignment="Stretch"> <StackPanel Margin="8 0 0 0" Grid.Column="1" VerticalAlignment="Stretch">
<TextBlock FontWeight="Bold" Text="{Binding DisplayName}" TextWrapping="Wrap" /> <TextBlock FontWeight="Bold" Text="{Binding DisplayName}" TextWrapping="Wrap" />
<TextBlock Text="{Binding Description}" TextWrapping="Wrap" /> <TextBlock Text="{Binding Description}" TextWrapping="Wrap" />

View File

@ -317,7 +317,7 @@
Margin="6" Margin="6"
Visibility="{Binding SelectedLayer, Converter={StaticResource NullToVisibilityConverter}}"> Visibility="{Binding SelectedLayer, Converter={StaticResource NullToVisibilityConverter}}">
<materialDesign:PackIcon Kind="Layers" Width="16" /> <materialDesign:PackIcon Kind="Layers" Width="16" />
<materialDesign:PackIcon Kind="{Binding SelectedLayer.LayerBrush.Descriptor.Icon}" <shared:ArtemisIcon Icon="{Binding SelectedLayer.LayerBrush.Descriptor.Icon}"
Width="16" Width="16"
Margin="5 0 0 0" Margin="5 0 0 0"
ToolTip="{Binding SelectedLayer.LayerBrush.Descriptor.DisplayName, Mode=OneWay}" ToolTip="{Binding SelectedLayer.LayerBrush.Descriptor.DisplayName, Mode=OneWay}"

View File

@ -9,11 +9,12 @@
xmlns:converters="clr-namespace:Artemis.UI.Converters" xmlns:converters="clr-namespace:Artemis.UI.Converters"
xmlns:dd="urn:gong-wpf-dragdrop" xmlns:dd="urn:gong-wpf-dragdrop"
xmlns:layerProperties="clr-namespace:Artemis.UI.Screens.ProfileEditor.LayerProperties" xmlns:layerProperties="clr-namespace:Artemis.UI.Screens.ProfileEditor.LayerProperties"
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
mc:Ignorable="d" mc:Ignorable="d"
d:DataContext="{d:DesignInstance local:TreeGroupViewModel}" d:DataContext="{d:DesignInstance local:TreeGroupViewModel}"
d:DesignHeight="450" d:DesignWidth="800"> d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources> <UserControl.Resources>
<converters:InverseBooleanConverter x:Key="InverseBooleanConverter"/> <converters:InverseBooleanConverter x:Key="InverseBooleanConverter" />
<converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter" /> <converters:NullToVisibilityConverter x:Key="NullToVisibilityConverter" />
<converters:PropertyTreeMarginConverter Length="20" x:Key="PropertyTreeMarginConverter" /> <converters:PropertyTreeMarginConverter Length="20" x:Key="PropertyTreeMarginConverter" />
</UserControl.Resources> </UserControl.Resources>
@ -105,8 +106,8 @@
</Style.Triggers> </Style.Triggers>
</Style> </Style>
</Grid.Style> </Grid.Style>
<materialDesign:PackIcon Grid.Column="0" <shared:ArtemisIcon Grid.Column="0"
Kind="{Binding LayerPropertyGroup.LayerBrush.Descriptor.Icon}" Icon="{Binding LayerPropertyGroup.LayerBrush.Descriptor.Icon}"
Margin="0 5 5 0" /> Margin="0 5 5 0" />
<TextBlock Grid.Column="1" <TextBlock Grid.Column="1"
ToolTip="{Binding LayerPropertyGroup.LayerBrush.Descriptor.Description}" ToolTip="{Binding LayerPropertyGroup.LayerBrush.Descriptor.Description}"
@ -151,10 +152,10 @@
</Style.Triggers> </Style.Triggers>
</Style> </Style>
</Grid.Style> </Grid.Style>
<materialDesign:PackIcon <shared:ArtemisIcon
Grid.Column="0" Grid.Column="0"
Cursor="SizeNS" Cursor="SizeNS"
Kind="{Binding LayerPropertyGroup.LayerEffect.Descriptor.Icon}" Icon="{Binding LayerPropertyGroup.LayerEffect.Descriptor.Icon}"
Margin="0 5 5 0" Margin="0 5 5 0"
Background="Transparent" /> Background="Transparent" />
<TextBlock Grid.Column="1" ToolTip="{Binding LayerPropertyGroup.LayerEffect.Descriptor.Description}" Margin="0 5 0 0"> <TextBlock Grid.Column="1" ToolTip="{Binding LayerPropertyGroup.LayerEffect.Descriptor.Description}" Margin="0 5 0 0">

View File

@ -6,7 +6,9 @@
xmlns:s="https://github.com/canton7/Stylet" xmlns:s="https://github.com/canton7/Stylet"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:treeItem1="clr-namespace:Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem" xmlns:treeItem1="clr-namespace:Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem"
xmlns:Converters="clr-namespace:Artemis.UI.Converters" x:Class="Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem.LayerView" xmlns:Converters="clr-namespace:Artemis.UI.Converters"
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
x:Class="Artemis.UI.Screens.ProfileEditor.ProfileTree.TreeItem.LayerView"
mc:Ignorable="d" mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" d:DesignHeight="450" d:DesignWidth="800"
d:DataContext="{d:DesignInstance {x:Type treeItem1:LayerViewModel}}"> d:DataContext="{d:DesignInstance {x:Type treeItem1:LayerViewModel}}">
@ -53,9 +55,9 @@
<ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<materialDesign:PackIcon Grid.Column="0" Kind="Layers" Width="16" VerticalAlignment="Center" /> <materialDesign:PackIcon Grid.Column="0" Kind="Layers" Width="16" VerticalAlignment="Center" />
<materialDesign:PackIcon Grid.Column="1" <shared:ArtemisIcon Grid.Column="1"
VerticalAlignment="Center" VerticalAlignment="Center"
Kind="{Binding Layer.LayerBrush.Descriptor.Icon}" Icon="{Binding Layer.LayerBrush.Descriptor.Icon}"
Width="16" Width="16"
Margin="5 0 0 0" Margin="5 0 0 0"
ToolTip="{Binding Layer.LayerBrush.Descriptor.DisplayName, Mode=OneWay}" ToolTip="{Binding Layer.LayerBrush.Descriptor.DisplayName, Mode=OneWay}"

View File

@ -7,6 +7,7 @@
xmlns:s="https://github.com/canton7/Stylet" xmlns:s="https://github.com/canton7/Stylet"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:windows="clr-namespace:Artemis.UI.Screens.ProfileEditor.Windows" xmlns:windows="clr-namespace:Artemis.UI.Screens.ProfileEditor.Windows"
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
mc:Ignorable="d" mc:Ignorable="d"
Title="Layer brush configuration" Title="Layer brush configuration"
Background="{DynamicResource MaterialDesignPaper}" Background="{DynamicResource MaterialDesignPaper}"
@ -25,7 +26,7 @@
<DockPanel> <DockPanel>
<controls:AppBar Type="Dense" Title="{Binding ActiveItem.LayerBrush.Descriptor.DisplayName}" DockPanel.Dock="Top" Margin="-18 0 0 0" ShowShadow="False"> <controls:AppBar Type="Dense" Title="{Binding ActiveItem.LayerBrush.Descriptor.DisplayName}" DockPanel.Dock="Top" Margin="-18 0 0 0" ShowShadow="False">
<controls:AppBar.AppIcon> <controls:AppBar.AppIcon>
<materialDesign:PackIcon Kind="{Binding ActiveItem.LayerBrush.Descriptor.Icon}" Width="20" Height="28" /> <shared:ArtemisIcon Icon="{Binding ActiveItem.LayerBrush.Descriptor.Icon}" Width="20" Height="28" />
</controls:AppBar.AppIcon> </controls:AppBar.AppIcon>
</controls:AppBar> </controls:AppBar>

View File

@ -7,6 +7,7 @@
xmlns:s="https://github.com/canton7/Stylet" xmlns:s="https://github.com/canton7/Stylet"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:windows="clr-namespace:Artemis.UI.Screens.ProfileEditor.Windows" xmlns:windows="clr-namespace:Artemis.UI.Screens.ProfileEditor.Windows"
xmlns:shared="clr-namespace:Artemis.UI.Shared;assembly=Artemis.UI.Shared"
mc:Ignorable="d" mc:Ignorable="d"
Title="Layer effect configuration" Title="Layer effect configuration"
Background="{DynamicResource MaterialDesignPaper}" Background="{DynamicResource MaterialDesignPaper}"
@ -23,7 +24,7 @@
<DockPanel> <DockPanel>
<controls:AppBar Type="Dense" Title="{Binding ActiveItem.LayerEffect.Descriptor.DisplayName}" DockPanel.Dock="Top" Margin="-18 0 0 0" ShowShadow="False"> <controls:AppBar Type="Dense" Title="{Binding ActiveItem.LayerEffect.Descriptor.DisplayName}" DockPanel.Dock="Top" Margin="-18 0 0 0" ShowShadow="False">
<controls:AppBar.AppIcon> <controls:AppBar.AppIcon>
<materialDesign:PackIcon Kind="{Binding ActiveItem.LayerEffect.Descriptor.Icon}" Width="20" Height="28" /> <shared:ArtemisIcon Icon="{Binding ActiveItem.LayerEffect.Descriptor.Icon}" Width="20" Height="28" />
</controls:AppBar.AppIcon> </controls:AppBar.AppIcon>
</controls:AppBar> </controls:AppBar>