Skip to content

Commit

Permalink
Merge pull request #44 from ffquintella/update-bogus-pkgs
Browse files Browse the repository at this point in the history
Update bogus pkgs
  • Loading branch information
PieroCastillo authored Dec 18, 2024
2 parents fe0139a + 3b0cdc7 commit ef529db
Show file tree
Hide file tree
Showing 44 changed files with 294 additions and 155 deletions.
8 changes: 4 additions & 4 deletions Tests/MathsForUI.Test/MathTests.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Aura.UI.Helpers;
using Aura.UI.Neumorphism.Controls;
//using Aura.UI.Neumorphism.Controls;
using Avalonia;
using Avalonia.Media;
using Avalonia.Skia;
Expand Down Expand Up @@ -56,10 +56,10 @@ public void ColorLuminanceTests(string baseColor, double intensity, string expec
{
var color = Color.Parse(baseColor).ToSKColor();

var light = Neumor.ChangeColorLuminosity(color, intensity);
var dark = Neumor.ChangeColorLuminosity(color, intensity * -1);
//var light = Neumor.ChangeColorLuminosity(color, intensity);
//var dark = Neumor.ChangeColorLuminosity(color, intensity * -1);

Assert.Equal(light.ToString(), Color.Parse(expectedLightColor).ToSKColor().ToString());
//Assert.Equal(light.ToString(), Color.Parse(expectedLightColor).ToSKColor().ToString());
}
}
}
8 changes: 4 additions & 4 deletions Tests/MathsForUI.Test/MathsForUI.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.6" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="6.0.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>Aura.UI.Gallery.NetCore</RootNamespace>
<LangVersion>12</LangVersion>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="11.0.7" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.7" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.7" />
<PackageReference Include="Avalonia" Version="11.2.2" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.2.2" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Aura.UI.Gallery\Aura.UI.Gallery.csproj" />
</ItemGroup>
</Project>
</Project>
4 changes: 2 additions & 2 deletions samples/Aura.UI.Gallery.Web/Aura.UI.Gallery.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.11" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.11" PrivateAssets="all" />
<PackageReference Include="Avalonia.Web.Blazor" Version="0.10.22" />
</ItemGroup>

Expand Down
17 changes: 8 additions & 9 deletions samples/Aura.UI.Gallery/Aura.UI.Gallery.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>10.0</LangVersion>
<LangVersion>12</LangVersion>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand All @@ -10,14 +10,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="AuraUtilities" Version="0.1.5.5" />
<PackageReference Include="Avalonia.AvaloniaEdit" Version="11.0.6" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.7" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.7" />
<PackageReference Include="Avalonia.Markup.Xaml.Loader" Version="11.0.7" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.7" />
<PackageReference Include="Avalonia.Svg" Version="11.0.0.12" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.7" />
<PackageReference Include="AvaloniaEdit.TextMate" Version="11.0.6" />
<PackageReference Include="Avalonia.AvaloniaEdit" Version="11.1.0" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.2.2" />
<PackageReference Include="Avalonia.Markup.Xaml.Loader" Version="11.2.2" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.2.2" />
<PackageReference Include="Avalonia.Svg" Version="11.2.0.2" />
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.2.2" />
<PackageReference Include="AvaloniaEdit.TextMate" Version="11.1.0" />
<PackageReference Include="jp2masa.Avalonia.Flexbox" Version="0.2.0" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/Aura.UI.Gallery/ViewLocator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public Control Build(object data)
}
}

public bool Match(object data)
public bool Match(object? data)
{
return data is ViewModelBase;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Aura.UI.FluentTheme/Aura.UI.FluentTheme.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</AvaloniaResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="11.0.7" />
<PackageReference Include="Avalonia.Xaml.Interactions.Draggable" Version="11.0.6" />
<PackageReference Include="Avalonia" Version="11.2.2" />
<PackageReference Include="Avalonia.Xaml.Interactions.Draggable" Version="11.2.0.1" />
</ItemGroup>
<Import Project="..\..\build\version.props" />
</Project>
12 changes: 7 additions & 5 deletions src/Aura.UI/Aura.UI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<Description>Control's Library for Avalonia.</Description>
<PackageIcon>AuraUILogo_full_icon.png</PackageIcon>
<GenerateAssemblyInfo>true</GenerateAssemblyInfo>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Include="AuraUILogo_full_icon.png" Pack="true" PackagePath="\" />
Expand All @@ -18,14 +19,15 @@
<Import Project="..\..\build\version.props" />
<ItemGroup>
<PackageReference Include="AuraUtilities" Version="0.1.5.5" />
<PackageReference Include="Avalonia" Version="11.0.7" />
<PackageReference Include="Avalonia.Desktop" Version="11.0.7" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.0.7" />
<PackageReference Include="Avalonia.Markup.Xaml.Loader" Version="11.0.7" />
<PackageReference Include="Avalonia" Version="11.2.2" />
<PackageReference Include="Avalonia.Desktop" Version="11.2.2" />
<PackageReference Include="Avalonia.Diagnostics" Version="11.2.2" />
<PackageReference Include="Avalonia.Markup.Xaml.Loader" Version="11.2.2" />
<PackageReference Include="Avalonia.ReactiveUI" Version="11.0.7" />
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="11.0.6" />
<PackageReference Include="Avalonia.Xaml.Interactivity" Version="11.0.6" />
<PackageReference Include="ReactiveUI" Version="19.5.41" />
<PackageReference Include="System.Reactive" Version="6.0.0" />
<PackageReference Include="System.Reactive" Version="6.0.1" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion src/Aura.UI/Controls/AuraTabItem/AuraTabItem.Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public partial class AuraTabItem
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected virtual void OnClosing(object sender, RoutedEventArgs e)
protected virtual void OnClosing(object? sender, RoutedEventArgs e)
{
IsClosing = true;
}
Expand Down
9 changes: 6 additions & 3 deletions src/Aura.UI/Controls/AuraTabItem/AuraTabItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Aura.UI.Controls
[PseudoClasses(":dragging", ":lockdrag")]
public partial class AuraTabItem : TabItem, ICustomCornerRadius
{
private Button CloseButton;
private Button? CloseButton;

public AuraTabItem()
{
Expand Down Expand Up @@ -85,8 +85,11 @@ protected void OnCanDraggablePropertyChanged(object sender, AvaloniaPropertyChan
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);

var closeButton = this.GetControl<Button>(e, "PART_CloseButton");

CloseButton = this.GetControl<Button>(e, "PART_CloseButton");
CloseButton = closeButton ?? throw new Exception("CloseButton not found");

if (IsClosable != false)
{
CloseButton.Click += CloseButton_Click;
Expand All @@ -97,7 +100,7 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
}
}

private void CloseButton_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
private void CloseButton_Click(object? sender, Avalonia.Interactivity.RoutedEventArgs e)
{
RaiseEvent(new RoutedEventArgs(CloseButtonClickEvent));
Close();
Expand Down
31 changes: 22 additions & 9 deletions src/Aura.UI/Controls/AuraTabView/AuraTabView.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Aura.UI.Controls.Primitives;
using System;
using Aura.UI.Controls.Primitives;
using Aura.UI.Extensions;
using Avalonia;
using Avalonia.Controls;
Expand All @@ -15,17 +16,17 @@ namespace Aura.UI.Controls
/// </summary>
public partial class AuraTabView : TabViewBase, IFootered
{
private Button AdderButton;
private Button? AdderButton;
internal double lastselectindex = 0;
private Border b_;
private Grid g_;
private Border? b_;
private Grid? g_;

static AuraTabView()
{
SelectionModeProperty.OverrideDefaultValue<AuraTabView>(SelectionMode.Single);
}

protected void AdderButtonClicked(object sender, RoutedEventArgs e)
protected void AdderButtonClicked(object? sender, RoutedEventArgs e)
{
var e_ = new RoutedEventArgs(ClickOnAddingButtonEvent);
RaiseEvent(e_);
Expand Down Expand Up @@ -54,18 +55,30 @@ protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);

AdderButton = this.GetControl<Button>(e, "PART_AdderButton");
var button = this.GetControl<Button>(e, "PART_AdderButton");

AdderButton = button ?? throw new Exception("AdderButton not found");

//AdderButton = this.GetControl<Button>(e, "PART_AdderButton");

AdderButton.Click += AdderButtonClicked;

b_ = this.GetControl<Border>(e, "PART_InternalBorder");
g_ = this.GetControl<Grid>(e, "PART_InternalGrid");
var b = this.GetControl<Border>(e, "PART_InternalBorder");
var g = this.GetControl<Grid>(e, "PART_InternalGrid");

b_ = b ?? throw new Exception("InternalBorder not found");
g_ = g ?? throw new Exception("InternalGrid not found");

PropertyChanged += AuraTabView_PropertyChanged;
}

private void AuraTabView_PropertyChanged(object sender, AvaloniaPropertyChangedEventArgs e)
private void AuraTabView_PropertyChanged(object? sender, AvaloniaPropertyChangedEventArgs e)
{
if(g_ is null || b_ is null)
{
return;
}

WidthRemainingSpace = g_.Bounds.Width;
HeightRemainingSpace = g_.Bounds.Height;
}
Expand Down
35 changes: 19 additions & 16 deletions src/Aura.UI/Controls/Badge/Badge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Aura.UI.Controls
{
public partial class Badge : ContentControl
{
ContentPresenter badgePresenter;
private ContentPresenter _badgePresenter = new();

static Badge()
{
Expand All @@ -20,66 +20,69 @@ static Badge()
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
base.OnApplyTemplate(e);
this.GetControl(e, "PART_BadgePresenter", out badgePresenter);
this.GetControl(e, "PART_BadgePresenter", out _badgePresenter);

badgePresenter.GetObservable(ContentProperty).Subscribe(SetBadgeMargin);
if(_badgePresenter is null)
throw new Exception("BadgePresenter not found");

_badgePresenter.GetObservable(ContentProperty).Subscribe(SetBadgeMargin);
BoundsProperty.Changed.Subscribe(SetBadgeMargin);
}

void SetBadgeMargin(object @object)
void SetBadgeMargin(object? @object)
{
double top = 0, left = 0, right = 0, bottom = 0;

switch (BadgePosition)
{
case BadgePosition.Right:
right = -badgePresenter.Bounds.Width / 2;
right = -_badgePresenter.Bounds.Width / 2;
BadgeVerticalAlignment = VerticalAlignment.Center;
BadgeHorizontalAlignment = HorizontalAlignment.Right;
break;

case BadgePosition.Left:
left = -badgePresenter.Bounds.Width / 2;
left = -_badgePresenter.Bounds.Width / 2;
BadgeVerticalAlignment = VerticalAlignment.Center;
BadgeHorizontalAlignment = HorizontalAlignment.Left;
break;

case BadgePosition.Top:
top = -badgePresenter.Bounds.Height / 2;
top = -_badgePresenter.Bounds.Height / 2;
BadgeVerticalAlignment = VerticalAlignment.Top;
BadgeHorizontalAlignment = HorizontalAlignment.Center;
break;

case BadgePosition.Bottom:
bottom = -badgePresenter.Bounds.Height / 2;
bottom = -_badgePresenter.Bounds.Height / 2;
BadgeVerticalAlignment = VerticalAlignment.Bottom;
BadgeHorizontalAlignment = HorizontalAlignment.Center;
break;

case BadgePosition.RightTop:
right = -badgePresenter.Bounds.Width / 2;
top = -badgePresenter.Bounds.Height / 2;
right = -_badgePresenter.Bounds.Width / 2;
top = -_badgePresenter.Bounds.Height / 2;
BadgeVerticalAlignment = VerticalAlignment.Top;
BadgeHorizontalAlignment = HorizontalAlignment.Right;
break;

case BadgePosition.LeftTop:
left = -badgePresenter.Bounds.Width / 2;
top = -badgePresenter.Bounds.Height / 2;
left = -_badgePresenter.Bounds.Width / 2;
top = -_badgePresenter.Bounds.Height / 2;
BadgeVerticalAlignment = VerticalAlignment.Top;
BadgeHorizontalAlignment = HorizontalAlignment.Left;
break;

case BadgePosition.RightBottom:
right = -badgePresenter.Bounds.Width / 2;
bottom = -badgePresenter.Bounds.Height / 2;
right = -_badgePresenter.Bounds.Width / 2;
bottom = -_badgePresenter.Bounds.Height / 2;
BadgeVerticalAlignment = VerticalAlignment.Bottom;
BadgeHorizontalAlignment = HorizontalAlignment.Right;
break;

case BadgePosition.LeftBottom:
left = -badgePresenter.Bounds.Width / 2;
bottom = -badgePresenter.Bounds.Height / 2;
left = -_badgePresenter.Bounds.Width / 2;
bottom = -_badgePresenter.Bounds.Height / 2;
BadgeVerticalAlignment = VerticalAlignment.Bottom;
BadgeHorizontalAlignment = HorizontalAlignment.Left;
break;
Expand Down
8 changes: 4 additions & 4 deletions src/Aura.UI/Controls/CardCollection/CardControl.Properties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,22 +116,22 @@ public Thickness InternalPadding
public static readonly StyledProperty<Thickness> InternalPaddingProperty =
AvaloniaProperty.Register<CardControl, Thickness>(nameof(InternalPadding));

public ICommand Command
public ICommand? Command
{
get => GetValue(CommandProperty);
set => SetValue(CommandProperty, value);
}

public static readonly StyledProperty<ICommand> CommandProperty =
public static readonly StyledProperty<ICommand?> CommandProperty =
Button.CommandProperty.AddOwner<CardControl>();

public object CommandParameter
public object? CommandParameter
{
get => GetValue(CommandParameterProperty);
set => SetValue(CommandParameterProperty, value);
}

public static readonly StyledProperty<object> CommandParameterProperty =
public static readonly StyledProperty<object?> CommandParameterProperty =
Button.CommandParameterProperty.AddOwner<CardControl>();

public ClickMode ClickMode
Expand Down
Loading

0 comments on commit ef529db

Please sign in to comment.