Updated Material Design Nuget packages

Fixed layer property tree height on different DPIs
This commit is contained in:
SpoinkyNL committed 2020-01-06 21:48:05 +01:00
1 parent 59f0062c97
commit 122214c7d9
17 files changed
+48 -33

No files matched your search

@@ -8,7 +8,7 @@
mc:Ignorable="d"
d:DesignHeight="213.053" d:DesignWidth="254.425">
<StackPanel Margin="16">
<TextBlock Style="{StaticResource MaterialDesignTitleTextBlock}">
<TextBlock Style="{StaticResource MaterialDesignHeadline6TextBlock}">
Add a new profile
</TextBlock>
@@ -8,7 +8,7 @@
mc:Ignorable="d"
d:DesignHeight="213.053" d:DesignWidth="254.425">
<StackPanel Margin="16">
<TextBlock Style="{StaticResource MaterialDesignTitleTextBlock}">
<TextBlock Style="{StaticResource MaterialDesignHeadline6TextBlock}">
Rename profile element
</TextBlock>
@@ -8,7 +8,7 @@
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<StackPanel>
<TextBlock Style="{StaticResource MaterialDesignSubheadingTextBlock}" Margin="10 5 0 -4">
<TextBlock Style="{StaticResource MaterialDesignSubtitle1TextBlock}" Margin="10 5 0 -4">
Display conditions
</TextBlock>
<Separator Style="{StaticResource MaterialDesignDarkSeparator}" Margin="8 0" />
@@ -29,7 +29,7 @@
<!-- Misc controls & time display -->
<StackPanel Grid.Row="0" VerticalAlignment="Center">
<TextBlock Style="{StaticResource MaterialDesignTitleTextBlock}" Text="{Binding CurrentTime}" HorizontalAlignment="Right" Margin="0 0 20 0" />
<TextBlock Style="{StaticResource MaterialDesignHeadline6TextBlock}" Text="{Binding FormattedCurrentTime}" HorizontalAlignment="Right" Margin="0 0 20 0" />
</StackPanel>
<!-- Properties tree -->
@@ -37,6 +37,18 @@ namespace Artemis.UI.Screens.Module.ProfileEditor.LayerProperties
}
}
public string FormattedCurrentTime
{
get
{
if (PixelsPerSecond > 200)
return $"{Math.Floor(CurrentTime.TotalSeconds):00}.{CurrentTime.Milliseconds:000}";
if (PixelsPerSecond > 60)
return $"{Math.Floor(CurrentTime.TotalSeconds):00}.{CurrentTime.Milliseconds:000}";
return $"{Math.Floor(CurrentTime.TotalMinutes):0}:{CurrentTime.Seconds:00}";
}
}
public int PixelsPerSecond
{
get => _pixelsPerSecond;
@@ -50,7 +50,7 @@
Margin="0,1,0,1.2"
Padding="0"
Width="80"
Height="Auto"
Height="20"
ToolTip="Change the property's data binding"
VerticalAlignment="Center">
<TextBlock FontSize="10">DATA BINDING</TextBlock>
@@ -15,7 +15,6 @@
<Setter Property="BorderBrush" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0" />
<Setter Property="Foreground" Value="{DynamicResource MaterialDesignBody}" />
<Setter Property="Padding" Value="1" />
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
<Setter Property="ScrollViewer.PanningMode" Value="Both" />
@@ -32,6 +31,7 @@
Background="{TemplateBinding Background}"
BorderBrush="{DynamicResource MaterialDesignDivider}"
BorderThickness="0,0,0,1"
Height="25"
Padding="{TemplateBinding Padding}">
<Grid Margin="{Binding Converter={StaticResource lengthConverter}, RelativeSource={RelativeSource TemplatedParent}}">
<Grid.ColumnDefinitions>
@@ -91,17 +91,16 @@
<TreeView.Resources>
<!-- Parents only show their name and children -->
<HierarchicalDataTemplate DataType="{x:Type local:PropertyTreeParentViewModel}" ItemsSource="{Binding Children}">
<StackPanel Height="22" Orientation="Horizontal">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding LayerPropertyViewModel.LayerProperty.Name}"
ToolTip="{Binding LayerPropertyViewModel.LayerProperty.Description}"
Margin="5 0"
VerticalAlignment="Center" />
</StackPanel>
</HierarchicalDataTemplate>
<!-- Children show their full view -->
<DataTemplate DataType="{x:Type local:PropertyTreeChildViewModel}">
<ContentControl s:View.Model="{Binding}" />
<DataTemplate DataType="{x:Type local:PropertyTreeChildViewModel}" >
<ContentControl s:View.Model="{Binding}"/>
</DataTemplate>
</TreeView.Resources>
</TreeView>
@@ -20,7 +20,7 @@
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel>
<TextBlock Style="{StaticResource MaterialDesignSubheadingTextBlock}" Margin="10 5 0 -4">
<TextBlock Style="{StaticResource MaterialDesignSubtitle1TextBlock}" Margin="10 5 0 -4">
Profile elements
</TextBlock>
<Separator Style="{StaticResource MaterialDesignDarkSeparator}" Margin="8 0" />