Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0-android</TargetFramework>
<TargetFramework>net8.0-android</TargetFramework>
<SupportedOSPlatformVersion>21</SupportedOSPlatformVersion>
<Nullable>enable</Nullable>
<ApplicationId>com.CompanyName.ColorPickerDemo.AvaloniaUI</ApplicationId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
namespace ColorPickerDemo.AvaloniaUI.Android;

[Activity(Label = "ColorPickerDemo.AvaloniaUI.Android", Theme = "@style/MyTheme.NoActionBar", Icon = "@drawable/icon",
MainLauncher = true,
LaunchMode = LaunchMode.SingleTop,
ConfigurationChanges = ConfigChanges.Orientation | ConfigChanges.ScreenSize | ConfigChanges.UiMode)]
public class MainActivity : AvaloniaMainActivity
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Application = Android.App.Application;
using Avalonia;
using Avalonia.Android;
using Avalonia.ReactiveUI;
using ReactiveUI.Avalonia;

namespace ColorPickerDemo.AvaloniaUI.Android;

Expand All @@ -15,7 +15,7 @@ protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{
return base.CustomizeAppBuilder(builder)
.WithInterFont()
.UseReactiveUI();
.UseReactiveUI(_ => { });
}

protected override void OnCreate(Bundle? savedInstanceState)
Expand All @@ -29,4 +29,4 @@ protected override void OnResume()

StartActivity(new Intent(Application.Context, typeof(MainActivity)));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Threading.Tasks;
using Avalonia;
using Avalonia.Browser;
using Avalonia.ReactiveUI;
using ReactiveUI.Avalonia;
using ColorPickerDemo.AvaloniaUI;

[assembly: SupportedOSPlatform("browser")]
Expand All @@ -13,7 +13,7 @@ private static async Task Main(string[] args)
{
await BuildAvaloniaApp()
.WithInterFont()
.UseReactiveUI()
.UseReactiveUI(_ => { })
.StartBrowserAppAsync("out");
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<!--If you are willing to use Windows/MacOS native APIs you will need to create 3 projects.
One for Windows with net7.0-windows TFM, one for MacOS with net7.0-macos and one with net7.0 TFM for Linux.-->
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
Expand All @@ -14,8 +12,6 @@

<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="$(AvaloniaVersion)"/>
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)"/>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using Avalonia;
using Avalonia.ReactiveUI;
using ReactiveUI.Avalonia;

namespace ColorPickerDemo.AvaloniaUI.Desktop;

Expand All @@ -23,6 +23,6 @@ public static AppBuilder BuildAvaloniaApp()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace()
.UseReactiveUI();
.UseReactiveUI(_ => { });
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Avalonia.Controls;
using Avalonia.iOS;
using Avalonia.Media;
using Avalonia.ReactiveUI;
using ReactiveUI.Avalonia;

namespace ColorPickerDemo.AvaloniaUI.iOS;

Expand All @@ -18,6 +18,6 @@ protected override AppBuilder CustomizeAppBuilder(AppBuilder builder)
{
return base.CustomizeAppBuilder(builder)
.WithInterFont()
.UseReactiveUI();
.UseReactiveUI(_ => { });
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0-ios</TargetFramework>
<TargetFramework>net8.0-ios</TargetFramework>
<SupportedOSPlatformVersion>10.0</SupportedOSPlatformVersion>
<ProvisioningType>manual</ProvisioningType>
<Nullable>enable</Nullable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@
<PackageReference Include="Avalonia" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Themes.Simple" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.Fonts.Inter" Version="$(AvaloniaVersion)"/>
<PackageReference Include="Avalonia.ReactiveUI" Version="$(AvaloniaVersion)"/>
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="$(AvaloniaVersion)"/>
<PackageReference Include="ReactiveUI.Avalonia" Version="11.*"/>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<AvaloniaVersion>11.2.5</AvaloniaVersion>
<AvaloniaVersion>12.0.0</AvaloniaVersion>
</PropertyGroup>
</Project>
12 changes: 3 additions & 9 deletions src/ColorPicker.AvaloniaUI/Behaviors/TextBoxFocusBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,12 @@ private void AssociatedObject_KeyUp(object sender, KeyEventArgs e)

private void RemoveFocus()
{
var focusManager = TopLevel.GetTopLevel(AssociatedObject).FocusManager;
var current = focusManager.GetFocusedElement();
if (current != null)
{
//TODO: Find non obsolete way to do this
var next = KeyboardNavigationHandler.GetNext(AssociatedObject, NavigationDirection.Next);
next?.Focus(NavigationMethod.Tab);
}
var focusManager = TopLevel.GetTopLevel(AssociatedObject)?.FocusManager;
focusManager?.TryMoveFocus(NavigationDirection.Next);
}

private void AssociatedObjectGotKeyboardFocus(
object sender, GotFocusEventArgs e)
object sender, FocusChangedEventArgs e)
{
if (SelectOnMouseClick || e.NavigationMethod == NavigationMethod.Tab)
{
Expand Down
6 changes: 3 additions & 3 deletions src/ColorPicker.AvaloniaUI/ColorPicker.AvaloniaUI.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<TargetFrameworks>net8.0;net10.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
Expand Down Expand Up @@ -31,8 +31,8 @@ Originally developed for PixiEditor: https://github.com/PixiEditor/PixiEditor.</
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="11.2.5" />
<PackageReference Include="Avalonia.Xaml.Interactivity" Version="11.0.5" />
<PackageReference Include="Avalonia" Version="12.0.0" />
<PackageReference Include="Xaml.Behaviors.Interactivity" Version="12.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/ColorPicker.AvaloniaUI/Templates/HueSlider.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
Source="{StaticResource masterImage}"
IsHitTestVisible="False">
<Image.OpacityMask>
<RadialGradientBrush GradientOrigin="50%,50%" Center="50%, 50%" Radius="0.5">
<RadialGradientBrush GradientOrigin="50%,50%" Center="50%, 50%" RadiusX="0.5" RadiusY="0.5">
<RadialGradientBrush.GradientStops>
<GradientStop Color="Transparent" Offset="0" />
<GradientStop Color="Transparent" Offset="0.839" />
Expand Down