Browse Source

Visual fixes

pull/165/head
Ionite 1 year ago
parent
commit
c15ed3e23c
No known key found for this signature in database
  1. 3
      StabilityMatrix.Avalonia/Controls/SamplerCard.axaml
  2. 17
      StabilityMatrix.Avalonia/Controls/StackExpander.axaml
  3. 25
      StabilityMatrix.Avalonia/Controls/UpscalerCard.axaml
  4. 8
      StabilityMatrix.Avalonia/Controls/UpscalerCard.axaml.cs

3
StabilityMatrix.Avalonia/Controls/SamplerCard.axaml

@ -19,9 +19,8 @@
<controls:Card
HorizontalAlignment="{TemplateBinding HorizontalAlignment}" >
<StackPanel
Margin="8"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
Spacing="12">
Spacing="8">
<Grid ColumnDefinitions="Auto,*" RowDefinitions="*,*,*">
<!-- Sampler -->
<TextBlock

17
StabilityMatrix.Avalonia/Controls/StackExpander.axaml

@ -7,9 +7,11 @@
x:DataType="vmInference:StackExpanderViewModel">
<Design.PreviewWith>
<Grid Width="600" Height="800">
<controls:StackExpander
DataContext="{x:Static mocks:DesignData.StackExpanderViewModel}"/>
<Grid Width="500" Height="800">
<StackPanel>
<controls:StackExpander
DataContext="{x:Static mocks:DesignData.StackExpanderViewModel}"/>
</StackPanel>
</Grid>
</Design.PreviewWith>
@ -41,6 +43,12 @@
VerticalAlignment="Top"
ItemsSource="{Binding Cards}">
<ItemsControl.Styles>
<Style Selector="controls|Card">
<Setter Property="IsCardVisualsEnabled" Value="False"/>
</Style>
</ItemsControl.Styles>
<ItemsControl.DataTemplates>
<local:ViewLocator/>
</ItemsControl.DataTemplates>
@ -48,8 +56,9 @@
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel
x:Name="PART_ItemsPanel"
VerticalAlignment="Top"
Spacing="{TemplateBinding Spacing}"/>
Spacing="{TemplateBinding Spacing}" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>

25
StabilityMatrix.Avalonia/Controls/UpscalerCard.axaml

@ -1,25 +1,28 @@
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:StabilityMatrix.Avalonia.Controls"
xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData"
xmlns:vmInference="using:StabilityMatrix.Avalonia.ViewModels.Inference"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:data="clr-namespace:FluentAvalonia.UI.Data;assembly=FluentAvalonia"
xmlns:comfy="clr-namespace:StabilityMatrix.Core.Models.Api.Comfy;assembly=StabilityMatrix.Core"
x:DataType="vmInference:UpscalerCardViewModel">
<Styles
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:comfy="clr-namespace:StabilityMatrix.Core.Models.Api.Comfy;assembly=StabilityMatrix.Core"
xmlns:controls="using:StabilityMatrix.Avalonia.Controls"
xmlns:data="clr-namespace:FluentAvalonia.UI.Data;assembly=FluentAvalonia"
xmlns:mocks="clr-namespace:StabilityMatrix.Avalonia.DesignData"
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
xmlns:vmInference="using:StabilityMatrix.Avalonia.ViewModels.Inference"
x:DataType="vmInference:UpscalerCardViewModel">
<Design.PreviewWith>
<Grid MinWidth="300">
<StackPanel Spacing="16">
<controls:UpscalerCard DataContext="{x:Static mocks:DesignData.UpscalerCardViewModel}" />
<controls:UpscalerCard
DataContext="{x:Static mocks:DesignData.UpscalerCardViewModel}" />
</StackPanel>
</Grid>
</Design.PreviewWith>
<Style Selector="controls|UpscalerCard">
<!-- Set Defaults -->
<!-- Set Defaults -->
<Setter Property="Template">
<ControlTemplate>
<controls:Card>
<controls:Card x:Name="PART_Card">
<StackPanel Spacing="8">
<Grid ColumnDefinitions="Auto,*" RowDefinitions="*,*,*">
<!-- Upscaler -->

8
StabilityMatrix.Avalonia/Controls/UpscalerCard.axaml.cs

@ -1,9 +1,5 @@
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Controls.Primitives;
namespace StabilityMatrix.Avalonia.Controls;
public class UpscalerCard : TemplatedControl
{
}
public class UpscalerCard : TemplatedControl { }

Loading…
Cancel
Save