Skip to content

Commit

Permalink
Merge pull request #315 from AuroraZiling/main
Browse files Browse the repository at this point in the history
Some UI adjustments & fixes
  • Loading branch information
kikipoulet authored Oct 21, 2024
2 parents e99f9aa + ade1802 commit 8a536d6
Show file tree
Hide file tree
Showing 6 changed files with 131 additions and 119 deletions.
44 changes: 22 additions & 22 deletions SukiUI.Demo/Features/ControlsLibrary/MiscView.axaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<UserControl x:Class="SukiUI.Demo.Features.ControlsLibrary.MiscView"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:suki="https://github.com/kikipoulet/SukiUI"
xmlns:controlsLibrary="clr-namespace:SukiUI.Demo.Features.ControlsLibrary"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:showMeTheXaml="clr-namespace:ShowMeTheXaml;assembly=ShowMeTheXaml.Avalonia"
xmlns:suki="https://github.com/kikipoulet/SukiUI"
d:DesignHeight="450"
d:DesignWidth="800"
x:DataType="controlsLibrary:MiscViewModel"
Expand Down Expand Up @@ -50,7 +50,7 @@
</suki:GlassCard>
<suki:GlassCard>
<suki:GroupBox Header="Time Picker">
<!-- <TimePicker /> -->
<!-- <TimePicker /> -->
</suki:GroupBox>
</suki:GlassCard>
<suki:GlassCard>
Expand Down Expand Up @@ -91,26 +91,26 @@

<suki:GlassCard>
<suki:GroupBox Header="File Picker">
<StackPanel Spacing="8">
<Button Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Classes="Primary"
Command="{Binding OpenFileCommand}"
Content="Open File" />
<Button Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Classes="Primary"
Command="{Binding SaveFileCommand}"
Content="Save File" />
<Button Margin="5"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Classes="Primary"
Command="{Binding OpenFolderCommand}"
Content="Open Folder" />
</StackPanel>
<!-- <StackPanel Spacing="8"> -->
<!-- <Button Margin="5" -->
<!-- HorizontalAlignment="Center" -->
<!-- VerticalAlignment="Center" -->
<!-- Classes="Primary" -->
<!-- Command="{Binding OpenFileCommand}" -->
<!-- Content="Open File" /> -->
<!-- <Button Margin="5" -->
<!-- HorizontalAlignment="Center" -->
<!-- VerticalAlignment="Center" -->
<!-- Classes="Primary" -->
<!-- Command="{Binding SaveFileCommand}" -->
<!-- Content="Save File" /> -->
<!-- <Button Margin="5" -->
<!-- HorizontalAlignment="Center" -->
<!-- VerticalAlignment="Center" -->
<!-- Classes="Primary" -->
<!-- Command="{Binding OpenFolderCommand}" -->
<!-- Content="Open Folder" /> -->
<!-- </StackPanel> -->
</suki:GroupBox>
</suki:GlassCard>
</WrapPanel>
Expand Down
4 changes: 3 additions & 1 deletion SukiUI.Demo/Features/Playground/PlaygroundView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
xmlns:avaloniaEdit="https://github.com/avaloniaui/avaloniaedit"
xmlns:suki="https://github.com/kikipoulet/SukiUI"
xmlns:converters="clr-namespace:SukiUI.Demo.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:playground="clr-namespace:SukiUI.Demo.Features.Playground"
xmlns:suki="https://github.com/kikipoulet/SukiUI"
d:DesignHeight="450"
d:DesignWidth="800"
x:DataType="playground:PlaygroundViewModel"
Expand All @@ -32,6 +32,7 @@
VerticalAlignment="Top"
Classes="Basic"
Click="ClosePane"
Command="{Binding TogglePaneDelayCommand}"
DockPanel.Dock="Top"
IsHitTestVisible="True"
Opacity="1">
Expand Down Expand Up @@ -170,6 +171,7 @@
VerticalAlignment="Top"
Classes="Basic"
Click="OpenPane"
Command="{Binding TogglePaneDelayCommand}"
IsHitTestVisible="True"
Opacity="1">
<StackPanel>
Expand Down
9 changes: 8 additions & 1 deletion SukiUI.Demo/Features/Playground/PlaygroundViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
using System;
using System.Collections.ObjectModel;
using System.Threading.Tasks;
using Avalonia.Controls.Notifications;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Material.Icons;
using SukiUI.Demo.Utilities;
using SukiUI.Toasts;

namespace SukiUI.Demo.Features.Playground;

internal class PlaygroundViewModel(ISukiToastManager toastManager) : DemoPageBase("Playground", MaterialIconKind.Pencil, -150)
internal partial class PlaygroundViewModel(ISukiToastManager toastManager) : DemoPageBase("Playground", MaterialIconKind.Pencil, -150)
{
// Delay the toggle pane to handle System.InvalidOperationException: The observable can only be subscribed once.
[RelayCommand]
private async Task TogglePaneDelay() => await Task.Delay(500);

public ObservableCollection<string> ButtonsElements { get; init; } =
[
XamlData.Buttons["ButtonFlat"],
Expand Down
Loading

0 comments on commit 8a536d6

Please sign in to comment.