aboutsummaryrefslogtreecommitdiffstatsci
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2024-07-12 09:12:56 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2024-07-12 09:12:56 +0200
commit243204e61bde6321719c7a4b33ac39d9d4c97383 (patch)
tree7518cfc6b892cc11e690ee8ce7e9aa4becd0d132
parent17a29e6b0dea1607c7094c9bf1df4d65f57bf033 (diff)
save commit
-rw-r--r--Backends/CairoBackend/Crow.CairoBackend.csproj2
-rw-r--r--Backends/CairoBackend/src/EglBackend.cs2
-rw-r--r--Backends/CairoBackend/src/GLSurface.cs4
-rw-r--r--Backends/CairoBackend/src/ImageBackend.cs2
-rw-r--r--Backends/CairoBackend/src/Surface.cs2
-rw-r--r--Backends/Directory.Build.props2
-rw-r--r--Backends/VkvgBackend/Crow.VkvgBackend.csproj2
-rw-r--r--Crow/Templates/DirectoryView.template6
-rw-r--r--Crow/src/Widgets/PrivateContainer.cs8
-rw-r--r--Crow/src/Widgets/Widget.cs4
-rw-r--r--Directory.Build.props4
-rw-r--r--Samples/Directory.Build.props2
-rw-r--r--Samples/HelloWorld/HelloWorld.csproj5
-rw-r--r--Samples/HelloWorld/main.cs6
-rw-r--r--Samples/common/ui/Interfaces/Divers/0.crow10
-rw-r--r--Samples/common/ui/Interfaces/Experimental/colorPicktest.crow6
16 files changed, 32 insertions, 35 deletions
diff --git a/Backends/CairoBackend/Crow.CairoBackend.csproj b/Backends/CairoBackend/Crow.CairoBackend.csproj
index d423fe36..37908375 100644
--- a/Backends/CairoBackend/Crow.CairoBackend.csproj
+++ b/Backends/CairoBackend/Crow.CairoBackend.csproj
@@ -20,7 +20,7 @@
<ItemGroup>
<PackageReference Include="glfw-sharp" Version="$(GlfwSharpVersion)" />
- <PackageReference Include="OpenGL.Net" Version="0.8.4" />
+ <!--<PackageReference Include="OpenGL.Net" Version="0.8.4" />-->
<ProjectReference Include="..\..\Drawing2D\Drawing2D.csproj" />
</ItemGroup>
diff --git a/Backends/CairoBackend/src/EglBackend.cs b/Backends/CairoBackend/src/EglBackend.cs
index 073793e7..a54f9917 100644
--- a/Backends/CairoBackend/src/EglBackend.cs
+++ b/Backends/CairoBackend/src/EglBackend.cs
@@ -3,6 +3,7 @@ using System.IO;
using Drawing2D;
using Glfw;
+#if CAIRO_HAS_GL
namespace Crow.CairoBackend
{
public class EglBackend : CairoBackendBase {
@@ -83,3 +84,4 @@ namespace Crow.CairoBackend
}
}
+#endif \ No newline at end of file
diff --git a/Backends/CairoBackend/src/GLSurface.cs b/Backends/CairoBackend/src/GLSurface.cs
index 4fa262cc..c55ec208 100644
--- a/Backends/CairoBackend/src/GLSurface.cs
+++ b/Backends/CairoBackend/src/GLSurface.cs
@@ -29,6 +29,9 @@
//
using System;
+
+#if CAIRO_HAS_GL
+
using OpenGL;
using static OpenGL.Gl;
@@ -93,3 +96,4 @@ namespace Crow.CairoBackend {
}
}
}
+#endif \ No newline at end of file
diff --git a/Backends/CairoBackend/src/ImageBackend.cs b/Backends/CairoBackend/src/ImageBackend.cs
index 3f59578b..c8ff7f5e 100644
--- a/Backends/CairoBackend/src/ImageBackend.cs
+++ b/Backends/CairoBackend/src/ImageBackend.cs
@@ -65,6 +65,8 @@ namespace Crow.CairoBackend
{
IContext ctx = base.PrepareUIFrame (existingContext, clipping);
+ //clear(ctx);
+
for (int i = 0; i < clipping.NumRectangles; i++)
ctx.Rectangle (clipping.GetRectangle (i));
ctx.Clip ();
diff --git a/Backends/CairoBackend/src/Surface.cs b/Backends/CairoBackend/src/Surface.cs
index 413384f0..5a217879 100644
--- a/Backends/CairoBackend/src/Surface.cs
+++ b/Backends/CairoBackend/src/Surface.cs
@@ -85,7 +85,9 @@ namespace Crow.CairoBackend {
case SurfaceType.Svg:
return new SvgSurface (surface, owned);
case SurfaceType.GL:
+#if CAIRO_HAS_GL
return new GLSurface (surface, owned);
+#endif
default:
return new Surface (surface, owned);
}
diff --git a/Backends/Directory.Build.props b/Backends/Directory.Build.props
index 0e333546..c13778f3 100644
--- a/Backends/Directory.Build.props
+++ b/Backends/Directory.Build.props
@@ -30,7 +30,7 @@
<PackageProjectUrl>https://github.com/jpbruyere/Crow/wiki</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIcon>crow.png</PackageIcon>
- <PackageCopyright>Copyright 2021</PackageCopyright>
+ <PackageCopyright>Copyright 2023</PackageCopyright>
</PropertyGroup>
<ItemGroup>
diff --git a/Backends/VkvgBackend/Crow.VkvgBackend.csproj b/Backends/VkvgBackend/Crow.VkvgBackend.csproj
index 226c336a..13303e95 100644
--- a/Backends/VkvgBackend/Crow.VkvgBackend.csproj
+++ b/Backends/VkvgBackend/Crow.VkvgBackend.csproj
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <TargetFramework>netcoreapp3.1</TargetFramework>
+ <TargetFramework>netstandard2.1</TargetFramework>
<AssemblyVersion>1.1.0</AssemblyVersion>
<PackageVersion>$(AssemblyVersion)-beta</PackageVersion>
diff --git a/Crow/Templates/DirectoryView.template b/Crow/Templates/DirectoryView.template
index 7a157bdd..efbdebac 100644
--- a/Crow/Templates/DirectoryView.template
+++ b/Crow/Templates/DirectoryView.template
@@ -6,7 +6,7 @@
Selected="{Background=${ControlHighlight}}"
Unselected="{Background=Transparent}">
<HorizontalStack>
- <Image Margin="1" Width="14" Height="14" Path="#Crow.Icons.file.svg"/>
+ <Image Margin="1" Width="${IconSize}" Height="${IconSize}" Path="#Crow.Icons.file.svg"/>
<Label Text="{Name}" Width="Stretched"/>
</HorizontalStack>
</ListItem>
@@ -23,13 +23,13 @@
MouseEnter="{Foreground=DimGrey}"
MouseLeave="{Foreground=Transparent}">
<HorizontalStack Background="{./Background}" Spacing="1">
- <Image Margin="1" Width="9" Height="9" Focusable="true" MouseDown="./onClickForExpand"
+ <Image Margin="1" Width="${IconSize}" Height="${IconSize}" Focusable="true" MouseDown="./onClickForExpand"
Path="{./Image}"
Visible="{./IsExpandable}"
SvgSub="{./IsExpanded}"
MouseEnter="{Background=LightGrey}"
MouseLeave="{Background=Transparent}"/>
- <Image Margin="1" Width="16" Height="16"
+ <Image Margin="1" Width="${IconSize}" Height="${IconSize}"
Path="#Crow.Icons.folder.svg" SvgSub="{./IsExpanded}"/>
<Label Text="{./Caption}"/>
</HorizontalStack>
diff --git a/Crow/src/Widgets/PrivateContainer.cs b/Crow/src/Widgets/PrivateContainer.cs
index a07563fc..addb54c7 100644
--- a/Crow/src/Widgets/PrivateContainer.cs
+++ b/Crow/src/Widgets/PrivateContainer.cs
@@ -14,7 +14,7 @@ namespace Crow
/// does not expose child to allow reuse of container
/// behaviour for widgets that have other xml hierarchy: example
/// TemplatedControl may have 3 children (template,templateItem,content) but
- /// behave exactely as a container for layouting and drawing
+ /// behave exactly as a container for layouting and drawing
/// </summary>
[DesignIgnore]
public class PrivateContainer : Widget
@@ -54,7 +54,7 @@ namespace Crow
child.Dispose ();
}
- child = _child as Widget;
+ child = _child;
if (child != null) {
child.Parent = this;
@@ -64,12 +64,12 @@ namespace Crow
}
}
//dispose child if not null
- protected virtual void deleteChild () {
+ /*protected virtual void deleteChild () {
Widget g = child;
SetChild (null);
if (g != null)
g.Dispose ();
- }
+ }*/
#region Widget Overrides
diff --git a/Crow/src/Widgets/Widget.cs b/Crow/src/Widgets/Widget.cs
index 3ed1f324..e3703119 100644
--- a/Crow/src/Widgets/Widget.cs
+++ b/Crow/src/Widgets/Widget.cs
@@ -967,10 +967,6 @@ namespace Crow
isVisible = value;
- /*if (!isVisible)
- unshownPostActions ();
- RegisterForLayouting (LayoutingType.Sizing);*/
-
if (isVisible){
IsDirty = true;
} else {
diff --git a/Directory.Build.props b/Directory.Build.props
index dcf84352..d5e60c55 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -6,7 +6,7 @@
<Authors>Jean-Philippe Bruyère</Authors>
<LangVersion>7.3</LangVersion>
- <CrowVersion>1.2.0</CrowVersion>
+ <CrowVersion>1.3.0</CrowVersion>
<CrowPackageVersion>$(CrowVersion)-beta</CrowPackageVersion>
<!-- If you dont have a native libstb on your system, enable the managed version of stb here
@@ -23,6 +23,6 @@
<!-- Used only by CrowIDE and CrowEdit-->
<CrowDesignModeEnabled>false</CrowDesignModeEnabled>
- <GlfwSharpVersion>0.2.14</GlfwSharpVersion>
+ <GlfwSharpVersion>0.2.15</GlfwSharpVersion>
</PropertyGroup>
</Project>
diff --git a/Samples/Directory.Build.props b/Samples/Directory.Build.props
index 5966c1e8..823ee37e 100644
--- a/Samples/Directory.Build.props
+++ b/Samples/Directory.Build.props
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
- <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
+ <TargetFrameworks>net6</TargetFrameworks>
<!--<TargetFrameworks>net5</TargetFrameworks>-->
<OutputType>Exe</OutputType>
diff --git a/Samples/HelloWorld/HelloWorld.csproj b/Samples/HelloWorld/HelloWorld.csproj
index 178d4537..6c6cdaf7 100644
--- a/Samples/HelloWorld/HelloWorld.csproj
+++ b/Samples/HelloWorld/HelloWorld.csproj
@@ -1,10 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
-
- <PropertyGroup>
- <TargetFramework>netcoreapp3.1</TargetFramework>
- <OutputType>Exe</OutputType>
- </PropertyGroup>
<ItemGroup>
<PackageReference Include="Crow" />
</ItemGroup>
diff --git a/Samples/HelloWorld/main.cs b/Samples/HelloWorld/main.cs
index fdf75a8d..54429171 100644
--- a/Samples/HelloWorld/main.cs
+++ b/Samples/HelloWorld/main.cs
@@ -11,13 +11,9 @@ namespace HelloWorld
//Interface.PreferedBackendType = Drawing2D.BackendType.Egl;
using (Program app = new Program ()) {
//app.Initialized += (sender, e) => app.LoadIMLFragment (@"<Label Text='Hello World' Background='Red' Top='50' Margin='0'/>");
- //app.Initialized += (sender, e) => app.LoadIMLFragment (@"<Window Caption='hello world'/>");
+ app.Initialized += (sender, e) => app.LoadIMLFragment (@"<Container Width='Stretched' ><Window Caption='hello world' Background='Jet'/></Container>");
app.Run ();
}
}
- protected override void OnInitialized()
- {
- Load ("/mnt/devel/crow/Samples/HelloWorld/ui/helloworld.crow");
- }
}
}
diff --git a/Samples/common/ui/Interfaces/Divers/0.crow b/Samples/common/ui/Interfaces/Divers/0.crow
index d282fade..b00da647 100644
--- a/Samples/common/ui/Interfaces/Divers/0.crow
+++ b/Samples/common/ui/Interfaces/Divers/0.crow
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<Window Caption="Showcase" Height="90%" Width="91%" Background="DarkGrey">
<HorizontalStack>
- <VerticalStack Width="30%" Margin="5">
+ <VerticalStack Width="30%" Margin="5" Spacing="10">
<ListBox Data="{PerfMeasures}" Height="Fit">
<Template>
- <GroupBox Caption="Performance">
- <VerticalStack Name="ItemsContainer" Width="90%" Spacing="2"/>
+ <GroupBox Caption="Performance" Margin="10">
+ <VerticalStack Name="ItemsContainer" Spacing="2" Margin="0"/>
</GroupBox>
</Template>
<ItemTemplate>
@@ -19,7 +19,7 @@
</ListBox>
<Label Width="Stretched" Margin="3" Background="DimGrey" />
<TextBox Text="TextBox" Multiline="true" Margin="3" />
- <HorizontalStack Height="Fit" Margin="5" Background="DimGrey" CornerRadius="10">
+ <HorizontalStack Height="Fit" Margin="15" Background="Jet" CornerRadius="10">
<VerticalStack Spacing="5" Width="50%">
<CheckBox Fit="true" Caption="test" />
<CheckBox Fit="true" />
@@ -38,7 +38,7 @@
<Label Text="MouseEvents" Width="50%" Margin="3" Background="Jet" Foreground="DimGrey" TextAlignment="Center" MouseClick="{Foreground=Green}" MouseDoubleClick="{Foreground=Yellow}" MouseEnter="{Foreground=White}" MouseLeave="{Foreground=DimGrey}" MouseDown="{Background=SeaGreen}" MouseUp="{Background=DimGrey}" />
</HorizontalStack>
<GroupBox Caption="Templated controls" Height="Fit" Margin="5">
- <HorizontalStack Height="Fit">
+ <HorizontalStack Height="Fit" Margin="10">
<VerticalStack Width="50%">
<CheckBox Style="CheckBox2" IsChecked="true" />
<CheckBox Style="CheckBox2" />
diff --git a/Samples/common/ui/Interfaces/Experimental/colorPicktest.crow b/Samples/common/ui/Interfaces/Experimental/colorPicktest.crow
index 1db2be6b..62ed8f7a 100644
--- a/Samples/common/ui/Interfaces/Experimental/colorPicktest.crow
+++ b/Samples/common/ui/Interfaces/Experimental/colorPicktest.crow
@@ -10,9 +10,9 @@
<ListItem Margin="1" Width="Stretched"
Selected="{Background=RoyalBlue}"
Unselected="{Background=Transparent}">
- <HorizontalStack Height="Fit" >
- <Widget Width="20" Height="14" Background="{}" CornerRadius="3"/>
- <Label Text="{}" Width="Stretched" />
+ <HorizontalStack Height="Fit" Spacing="10" >
+ <Widget Width="60" Height="40" Background="{}" CornerRadius="3"/>
+ <Label Text="{}" Width="Stretched" Font="Mono, 20" />
</HorizontalStack>
</ListItem>
</ItemTemplate>