flabbet il y a 1 an
Parent
commit
a1e25ab037

+ 4 - 2
src/PixiEditor.Beta/WelcomeMessageState.cs

@@ -6,14 +6,16 @@ namespace PixiEditor.Beta;
 public class WelcomeMessageState : State
 {
     private const string Body = @"
-We are extremely exicted to share this version to you, early testers. Before you jump in and test all the new things,
-we have a few things to note:
+We are extremely excited to share this version with you, early testers. Before you jump in and test all the new things, we have a few things to note:
 
 - This is a very early version of PixiEditor 2.0. Not every feature promised in the roadmap is
   implemented yet. 
+
 - App is not production ready! Expect bugs, crashes, unfinished features, placeholders and other signs of development.
+
 - Your feedback is the most important thing of this beta, please take a moment to report any issues and suggestions on PixiEditor Forum.
 (forum.pixieditor.net)
+
 - We are collecting anonymous usage data to fix bugs, crashes and performance issues. This data will help us to improve the app. During the beta 
 there is no option to opt-out. No personal data is collected.
 

+ 6 - 0
src/PixiEditor.Extensions.Sdk/Api/FlyUI/Hyperlink.cs

@@ -0,0 +1,6 @@
+namespace PixiEditor.Extensions.Sdk.Api.FlyUI;
+
+public class Hyperlink
+{
+    
+}

+ 35 - 0
src/PixiEditor.Extensions/FlyUI/Elements/Hyperlink.cs

@@ -0,0 +1,35 @@
+using System.Collections.Immutable;
+using Avalonia.Controls;
+using PixiEditor.Extensions.CommonApi.FlyUI;
+
+namespace PixiEditor.Extensions.FlyUI.Elements;
+
+public class Hyperlink : StatelessElement, IPropertyDeserializable
+{
+    public string Url { get; set; }
+    public string Text { get; set; }
+    
+    public Hyperlink(string url, string text)
+    {
+        Url = url;
+        Text = text;
+    }
+
+    public override Control BuildNative()
+    {
+        Hyperlink
+        
+       
+        return hyperlink;
+    }
+
+    public IEnumerable<object> GetProperties()
+    {
+        throw new NotImplementedException();
+    }
+
+    public void DeserializeProperties(ImmutableList<object> values)
+    {
+        throw new NotImplementedException();
+    }
+}

+ 1 - 0
src/PixiEditor.Extensions/PixiEditor.Extensions.csproj

@@ -24,5 +24,6 @@
       <ProjectReference Include="..\Drawie\src\Drawie.Backend.Core\Drawie.Backend.Core.csproj" />
       <ProjectReference Include="..\Drawie\src\Drawie.Numerics\Drawie.Numerics.csproj" />
       <ProjectReference Include="..\PixiEditor.Extensions.CommonApi\PixiEditor.Extensions.CommonApi.csproj" />
+      <ProjectReference Include="..\PixiEditor.OperatingSystem\PixiEditor.OperatingSystem.csproj" />
     </ItemGroup>
 </Project>

+ 5 - 5
src/PixiEditor/Helpers/UI/Hyperlink.cs → src/PixiEditor.Extensions/UI/Hyperlink.cs

@@ -4,7 +4,7 @@ using Avalonia.Controls;
 using Avalonia.Input;
 using PixiEditor.OperatingSystem;
 
-namespace PixiEditor.Helpers.UI;
+namespace PixiEditor.Extensions.UI;
 
 public class Hyperlink : AvaloniaObject
 {
@@ -36,11 +36,11 @@ public class Hyperlink : AvaloniaObject
 
     static Hyperlink()
     {
-        UrlProperty.Changed.Subscribe(OnUrlSet);
-        CommandProperty.Changed.Subscribe(OnCommandSet);
+        UrlProperty.Changed.AddClassHandler<Hyperlink>(OnUrlSet);
+        CommandProperty.Changed.AddClassHandler<Hyperlink>(OnCommandSet);
     }
 
-    private static void OnUrlSet(AvaloniaPropertyChangedEventArgs e)
+    private static void OnUrlSet(Hyperlink hyperlink, AvaloniaPropertyChangedEventArgs e)
     {
         if (e.Sender is TextBlock tb)
         {
@@ -59,7 +59,7 @@ public class Hyperlink : AvaloniaObject
         }
     }
 
-    private static void OnCommandSet(AvaloniaPropertyChangedEventArgs e)
+    private static void OnCommandSet(Hyperlink hyperlink, AvaloniaPropertyChangedEventArgs e)
     {
         if (e.Sender is TextBlock tb)
         {