mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
144 lines
7.0 KiB
XML
144 lines
7.0 KiB
XML
<UserControl x:Class="Artemis.UI.Screens.Module.ProfileEditor.ProfileEditorView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
|
xmlns:s="https://github.com/canton7/Stylet"
|
|
xmlns:profileEditor="clr-namespace:Artemis.UI.Screens.Module.ProfileEditor"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800"
|
|
d:DataContext="{d:DesignInstance Type=profileEditor:ProfileEditorViewModel, IsDesignTimeCreatable=False}">
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary
|
|
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.TextBlock.xaml" />
|
|
<ResourceDictionary
|
|
Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.PopupBox.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
|
|
<UserControl.InputBindings>
|
|
<KeyBinding Command="{s:Action Undo}" Modifiers="Control" Key="Z" />
|
|
<KeyBinding Command="{s:Action Redo}" Modifiers="Control" Key="Y" />
|
|
</UserControl.InputBindings>
|
|
|
|
<Grid Margin="16">
|
|
<Grid.ColumnDefinitions>
|
|
<!-- Left side -->
|
|
<ColumnDefinition Width="*" MinWidth="100" />
|
|
<!-- Side panels resize -->
|
|
<ColumnDefinition Width="Auto" />
|
|
<!-- Side panels -->
|
|
<ColumnDefinition Width="{Binding SidePanelsWidth.Value, Mode=TwoWay}" MinWidth="100" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Left side -->
|
|
<Grid Grid.Row="0" Grid.Column="0">
|
|
<Grid.RowDefinitions>
|
|
<!-- Introduction -->
|
|
<RowDefinition Height="35" />
|
|
<!-- Design area -->
|
|
<RowDefinition Height="*" MinHeight="200" />
|
|
<!-- Bottom panels resize -->
|
|
<RowDefinition Height="Auto" />
|
|
<!-- Bottom panels -->
|
|
<RowDefinition Height="{Binding BottomPanelsHeight.Value, Mode=TwoWay}" MinHeight="108" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Introduction -->
|
|
<StackPanel Grid.Row="0">
|
|
<TextBlock>
|
|
<materialDesign:PackIcon Kind="AboutOutline" /> The profile defines what colors the LEDs will have. Multiple groups of LEDs are defined into layers. On these layers you can apply effects.
|
|
</TextBlock>
|
|
<Separator Style="{StaticResource MaterialDesignDarkSeparator}" Margin="0 -2.5 0 0" />
|
|
</StackPanel>
|
|
|
|
<!-- Design area -->
|
|
<materialDesign:Card Grid.Row="1" materialDesign:ShadowAssist.ShadowDepth="Depth1" VerticalAlignment="Stretch">
|
|
<ContentControl s:View.Model="{Binding ProfileViewModel}" />
|
|
</materialDesign:Card>
|
|
|
|
<!-- Bottom panels resize -->
|
|
<GridSplitter Grid.Row="2" Grid.Column="0" Height="5" HorizontalAlignment="Stretch" Cursor="SizeNS" Margin="0 5" />
|
|
|
|
<!-- Bottom panels -->
|
|
<Grid Grid.Row="3">
|
|
<!-- Layer elements -->
|
|
<materialDesign:Card Grid.Column="0" materialDesign:ShadowAssist.ShadowDepth="Depth1" VerticalAlignment="Stretch">
|
|
<ContentControl s:View.Model="{Binding LayerPropertiesViewModel}" />
|
|
</materialDesign:Card>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<!-- Side panels resize -->
|
|
<GridSplitter Grid.Row="0" Grid.Column="1" Width="5" HorizontalAlignment="Stretch" Cursor="SizeWE" Margin="5 35 5 0" />
|
|
|
|
<!-- Side panels -->
|
|
<Grid Grid.Row="0" Grid.Column="2">
|
|
<Grid.RowDefinitions>
|
|
<!-- Profile selection -->
|
|
<RowDefinition Height="35" />
|
|
<!-- Profile elements -->
|
|
<RowDefinition Height="*" MinHeight="100" />
|
|
<!-- Conditions resize -->
|
|
<RowDefinition Height="Auto" />
|
|
<!-- Display conditions -->
|
|
<RowDefinition Height="{Binding DisplayConditionsHeight.Value, Mode=TwoWay}" MinHeight="100" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Profile selection -->
|
|
<Grid Grid.Row="0">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ComboBox Name="LocaleCombo"
|
|
Height="26"
|
|
VerticalAlignment="Top"
|
|
ItemsSource="{Binding Profiles}"
|
|
SelectedItem="{Binding SelectedProfile}"
|
|
DisplayMemberPath="Name">
|
|
<ComboBox.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<VirtualizingStackPanel />
|
|
</ItemsPanelTemplate>
|
|
</ComboBox.ItemsPanel>
|
|
</ComboBox>
|
|
<Button Style="{StaticResource MaterialDesignFloatingActionMiniButton}"
|
|
Margin="10 0"
|
|
Grid.Column="1"
|
|
Width="26"
|
|
Height="26"
|
|
VerticalAlignment="Top"
|
|
Command="{s:Action AddProfile}">
|
|
<materialDesign:PackIcon Kind="Add" Height="14" Width="14" />
|
|
</Button>
|
|
<Button Style="{StaticResource MaterialDesignFloatingActionMiniDarkButton}"
|
|
Grid.Column="2"
|
|
Width="26"
|
|
Height="26"
|
|
VerticalAlignment="Top"
|
|
Command="{s:Action DeleteActiveProfile}">
|
|
<materialDesign:PackIcon Kind="TrashCanOutline" Height="14" Width="14" />
|
|
</Button>
|
|
</Grid>
|
|
|
|
<!-- Profile elements -->
|
|
<materialDesign:Card Grid.Row="1" materialDesign:ShadowAssist.ShadowDepth="Depth1" VerticalAlignment="Stretch">
|
|
<ContentControl s:View.Model="{Binding ProfileTreeViewModel}" Margin="0,-1,-0.2,1" />
|
|
</materialDesign:Card>
|
|
|
|
<!-- Conditions resize -->
|
|
<GridSplitter Grid.Row="2" Height="5" HorizontalAlignment="Stretch" Cursor="SizeNS" Margin="0 5" />
|
|
|
|
<!-- Display conditions -->
|
|
<materialDesign:Card Grid.Row="3" materialDesign:ShadowAssist.ShadowDepth="Depth1" VerticalAlignment="Stretch">
|
|
<ContentControl s:View.Model="{Binding DisplayConditionsViewModel}" />
|
|
</materialDesign:Card>
|
|
</Grid>
|
|
</Grid>
|
|
</UserControl> |