mirror of
https://gitcode.com/gh_mirrors/se/Semi.Avalonia
synced 2026-06-07 18:38:17 +08:00
Compare commits
2 Commits
331141197d
...
decoration
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f557bb2c5 | |||
| ec94bdd36d |
@@ -3,6 +3,7 @@
|
|||||||
<Project Path="demo/Semi.Avalonia.Demo.Android/Semi.Avalonia.Demo.Android.csproj"/>
|
<Project Path="demo/Semi.Avalonia.Demo.Android/Semi.Avalonia.Demo.Android.csproj"/>
|
||||||
<Project Path="demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj"/>
|
<Project Path="demo/Semi.Avalonia.Demo.Desktop/Semi.Avalonia.Demo.Desktop.csproj"/>
|
||||||
<Project Path="demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj"/>
|
<Project Path="demo/Semi.Avalonia.Demo.Drm/Semi.Avalonia.Demo.Drm.csproj"/>
|
||||||
|
<Project Path="demo/Semi.Avalonia.Demo.Fonts/Semi.Avalonia.Demo.Fonts.csproj"/>
|
||||||
<Project Path="demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj"/>
|
<Project Path="demo/Semi.Avalonia.Demo.Web/Semi.Avalonia.Demo.Web.csproj"/>
|
||||||
<Project Path="demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj"/>
|
<Project Path="demo/Semi.Avalonia.Demo/Semi.Avalonia.Demo.csproj"/>
|
||||||
</Folder>
|
</Folder>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
using Android.Runtime;
|
using Android.Runtime;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Android;
|
using Avalonia.Android;
|
||||||
|
using Semi.Avalonia.Demo.Fonts;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Android;
|
namespace Semi.Avalonia.Demo.Android;
|
||||||
|
|
||||||
@@ -17,4 +18,4 @@ public class Application : AvaloniaAndroidApplication<App>
|
|||||||
return base.CustomizeAppBuilder(builder)
|
return base.CustomizeAppBuilder(builder)
|
||||||
.WithSourceHanSansCNFont();
|
.WithSourceHanSansCNFont();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +0,0 @@
|
|||||||
using Avalonia;
|
|
||||||
using Avalonia.Media;
|
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Android;
|
|
||||||
|
|
||||||
public static class AvaloniaAppBuilderExtensions
|
|
||||||
{
|
|
||||||
private static string DefaultFontFamily => "avares://Semi.Avalonia.Demo.Android/Assets#Source Han Sans CN";
|
|
||||||
|
|
||||||
public static AppBuilder WithSourceHanSansCNFont(this AppBuilder builder) =>
|
|
||||||
builder.With(new FontManagerOptions
|
|
||||||
{
|
|
||||||
DefaultFamilyName = DefaultFontFamily,
|
|
||||||
FontFallbacks = [new FontFallback { FontFamily = new FontFamily(DefaultFontFamily) }]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<AndroidResource Include="Icon.png" Link="Resources\drawable\Icon.png"/>
|
<AndroidResource Include="Icon.png" Link="Resources\drawable\Icon.png"/>
|
||||||
<AvaloniaResource Include="..\Fonts\*" Link="Assets\Fonts\%(Filename)%(Extension)" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -31,5 +30,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
||||||
|
<ProjectReference Include="..\Semi.Avalonia.Demo.Fonts\Semi.Avalonia.Demo.Fonts.csproj"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -2,8 +2,10 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Dialogs;
|
using Avalonia.Dialogs;
|
||||||
using Avalonia.Media;
|
using Avalonia.Media;
|
||||||
|
using Semi.Avalonia.Demo.Fonts;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Desktop;
|
namespace Semi.Avalonia.Demo.Desktop;
|
||||||
|
#pragma warning disable CA1416, AVALONIA_X11_CSD, AVALONIA_X11_FORCE_CSD
|
||||||
|
|
||||||
sealed class Program
|
sealed class Program
|
||||||
{
|
{
|
||||||
@@ -11,24 +13,28 @@ sealed class Program
|
|||||||
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
|
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
|
||||||
// yet and stuff might break.
|
// yet and stuff might break.
|
||||||
[STAThread]
|
[STAThread]
|
||||||
public static void Main(string[] args) => BuildAvaloniaApp()
|
public static void Main(string[] args)
|
||||||
.With(new FontManagerOptions
|
{
|
||||||
{
|
var appBuilder = BuildAvaloniaApp();
|
||||||
FontFallbacks =
|
if (!OperatingSystem.IsLinux())
|
||||||
[
|
appBuilder.With(new FontManagerOptions
|
||||||
new FontFallback
|
{
|
||||||
{
|
FontFallbacks = [new FontFallback { FontFamily = new FontFamily("Microsoft YaHei") }]
|
||||||
FontFamily = new FontFamily("Microsoft YaHei")
|
});
|
||||||
}
|
|
||||||
]
|
appBuilder.StartWithClassicDesktopLifetime(args);
|
||||||
})
|
}
|
||||||
.StartWithClassicDesktopLifetime(args);
|
|
||||||
|
|
||||||
// Avalonia configuration, don't remove; also used by visual designer.
|
// Avalonia configuration, don't remove; also used by visual designer.
|
||||||
public static AppBuilder BuildAvaloniaApp()
|
public static AppBuilder BuildAvaloniaApp()
|
||||||
=> AppBuilder.Configure<App>()
|
{
|
||||||
|
var appBuilder = AppBuilder.Configure<App>()
|
||||||
.UseManagedSystemDialogs()
|
.UseManagedSystemDialogs()
|
||||||
.UsePlatformDetect()
|
.UsePlatformDetect()
|
||||||
.With(new Win32PlatformOptions())
|
.With(new Win32PlatformOptions())
|
||||||
|
.With(new X11PlatformOptions { EnableDrawnDecorations = true })
|
||||||
.LogToTrace();
|
.LogToTrace();
|
||||||
}
|
if (OperatingSystem.IsLinux()) appBuilder.WithSourceHanSansCNFont();
|
||||||
|
return appBuilder;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
|
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
|
||||||
@@ -28,5 +28,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
||||||
|
<ProjectReference Include="..\Semi.Avalonia.Demo.Fonts\Semi.Avalonia.Demo.Fonts.csproj"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -4,8 +4,10 @@ using System.Linq;
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Dialogs;
|
using Avalonia.Dialogs;
|
||||||
|
using Semi.Avalonia.Demo.Fonts;
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Drm;
|
namespace Semi.Avalonia.Demo.Drm;
|
||||||
|
#pragma warning disable CA1416, AVALONIA_X11_CSD, AVALONIA_X11_FORCE_CSD
|
||||||
|
|
||||||
sealed class Program
|
sealed class Program
|
||||||
{
|
{
|
||||||
@@ -40,17 +42,17 @@ sealed class Program
|
|||||||
=> AppBuilder.Configure<App>()
|
=> AppBuilder.Configure<App>()
|
||||||
.UseManagedSystemDialogs()
|
.UseManagedSystemDialogs()
|
||||||
.UsePlatformDetect()
|
.UsePlatformDetect()
|
||||||
.With(new Win32PlatformOptions())
|
.With(new X11PlatformOptions { EnableDrawnDecorations = true })
|
||||||
|
.WithSourceHanSansCNFont()
|
||||||
.LogToTrace();
|
.LogToTrace();
|
||||||
|
|
||||||
private static void SilenceConsole()
|
private static void SilenceConsole()
|
||||||
{
|
{
|
||||||
new Thread(() =>
|
new Thread(() =>
|
||||||
{
|
{
|
||||||
Console.CursorVisible = false;
|
Console.CursorVisible = false;
|
||||||
while (true)
|
while (true)
|
||||||
Console.ReadKey(true);
|
Console.ReadKey(true);
|
||||||
})
|
}) { IsBackground = true }.Start();
|
||||||
{ IsBackground = true }.Start();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
|
<ApplicationIcon>..\Semi.Avalonia.Demo\Assets\irihi.ico</ApplicationIcon>
|
||||||
@@ -29,5 +29,6 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
||||||
|
<ProjectReference Include="..\Semi.Avalonia.Demo.Fonts\Semi.Avalonia.Demo.Fonts.csproj"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Media;
|
||||||
|
|
||||||
|
namespace Semi.Avalonia.Demo.Fonts;
|
||||||
|
|
||||||
|
public static class AvaloniaAppBuilderExtensions
|
||||||
|
{
|
||||||
|
public static AppBuilder WithSourceHanSansCNFont(this AppBuilder builder)
|
||||||
|
{
|
||||||
|
const string uri = "avares://Semi.Avalonia.Demo.Fonts/Assets#Source Han Sans CN";
|
||||||
|
return builder.With(new FontManagerOptions
|
||||||
|
{
|
||||||
|
DefaultFamilyName = uri, FontFallbacks = [new FontFallback { FontFamily = new FontFamily(uri) }]
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<AvaloniaResource Include="Assets\**" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Avalonia"/>
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
using Avalonia;
|
|
||||||
using Avalonia.Media;
|
|
||||||
|
|
||||||
namespace Semi.Avalonia.Demo.Web;
|
|
||||||
|
|
||||||
public static class AvaloniaAppBuilderExtensions
|
|
||||||
{
|
|
||||||
private static string DefaultFontFamily => "avares://Semi.Avalonia.Demo.Web/Assets#Source Han Sans CN";
|
|
||||||
|
|
||||||
public static AppBuilder WithSourceHanSansCNFont(this AppBuilder builder) =>
|
|
||||||
builder.With(new FontManagerOptions
|
|
||||||
{
|
|
||||||
DefaultFamilyName = DefaultFontFamily,
|
|
||||||
FontFallbacks = [new FontFallback { FontFamily = new FontFamily(DefaultFontFamily) }]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Browser;
|
using Avalonia.Browser;
|
||||||
|
using Semi.Avalonia.Demo.Fonts;
|
||||||
|
|
||||||
[assembly: SupportedOSPlatform("browser")]
|
[assembly: SupportedOSPlatform("browser")]
|
||||||
|
|
||||||
@@ -15,4 +16,4 @@ internal sealed partial class Program
|
|||||||
|
|
||||||
public static AppBuilder BuildAvaloniaApp()
|
public static AppBuilder BuildAvaloniaApp()
|
||||||
=> AppBuilder.Configure<App>();
|
=> AppBuilder.Configure<App>();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,15 +6,12 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<AvaloniaResource Include="..\Fonts\*" Link="Assets\Fonts\%(Filename)%(Extension)" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Avalonia.Browser"/>
|
<PackageReference Include="Avalonia.Browser"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
<ProjectReference Include="..\Semi.Avalonia.Demo\Semi.Avalonia.Demo.csproj"/>
|
||||||
|
<ProjectReference Include="..\Semi.Avalonia.Demo.Fonts\Semi.Avalonia.Demo.Fonts.csproj"/>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:semi="https://irihi.tech/semi"
|
xmlns:semi="https://irihi.tech/semi"
|
||||||
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
xmlns:vm="clr-namespace:Semi.Avalonia.Demo.ViewModels"
|
||||||
|
RequestedThemeVariant="Default"
|
||||||
x:DataType="vm:ApplicationViewModel">
|
x:DataType="vm:ApplicationViewModel">
|
||||||
<Application.Styles>
|
<Application.Styles>
|
||||||
<semi:SemiTheme Locale="zh-CN" />
|
<semi:SemiTheme Locale="zh-CN" />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
using System;
|
||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls.ApplicationLifetimes;
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
using Avalonia.Data.Core.Plugins;
|
|
||||||
using Avalonia.Markup.Xaml;
|
using Avalonia.Markup.Xaml;
|
||||||
using Semi.Avalonia.Demo.ViewModels;
|
using Semi.Avalonia.Demo.ViewModels;
|
||||||
using Semi.Avalonia.Demo.Views;
|
using Semi.Avalonia.Demo.Views;
|
||||||
@@ -15,25 +15,29 @@ public partial class App : Application
|
|||||||
#if DEBUG
|
#if DEBUG
|
||||||
this.AttachDeveloperTools();
|
this.AttachDeveloperTools();
|
||||||
#endif
|
#endif
|
||||||
this.DataContext = new ApplicationViewModel();
|
DataContext = new ApplicationViewModel();
|
||||||
|
if (OperatingSystem.IsLinux())
|
||||||
|
{
|
||||||
|
Resources.Add("DefaultFontFamily", null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnFrameworkInitializationCompleted()
|
public override void OnFrameworkInitializationCompleted()
|
||||||
{
|
{
|
||||||
switch (ApplicationLifetime)
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
{
|
{
|
||||||
case IClassicDesktopStyleApplicationLifetime desktop:
|
desktop.MainWindow = new MainWindow { DataContext = new MainViewModel() };
|
||||||
// Line below is needed to remove Avalonia data validation.
|
}
|
||||||
// Without this line you will get duplicate validations from both Avalonia and CT
|
else if (ApplicationLifetime is IActivityApplicationLifetime applicationLifetime)
|
||||||
// BindingPlugins.DataValidators.RemoveAt(0);
|
{
|
||||||
desktop.MainWindow = new MainWindow();
|
applicationLifetime.MainViewFactory = () => new MainView { DataContext = new MainViewModel() };
|
||||||
break;
|
}
|
||||||
case ISingleViewApplicationLifetime singleView:
|
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewPlatform)
|
||||||
singleView.MainView = new MainView();
|
{
|
||||||
break;
|
singleViewPlatform.MainView = new MainView { DataContext = new MainViewModel() };
|
||||||
}
|
}
|
||||||
|
|
||||||
this.RegisterFollowSystemTheme();
|
this.RegisterFollowSystemTheme();
|
||||||
base.OnFrameworkInitializationCompleted();
|
base.OnFrameworkInitializationCompleted();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<LangVersion>latest</LangVersion>
|
<LangVersion>latest</LangVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
{
|
|
||||||
"sdk": {
|
|
||||||
"version": "8.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"sdk": {
|
"sdk": {
|
||||||
"version": "8.0.0",
|
"version": "10.0.0",
|
||||||
"rollForward": "latestMajor",
|
"rollForward": "latestMajor",
|
||||||
"allowPrerelease": true
|
"allowPrerelease": true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,8 +46,8 @@
|
|||||||
|
|
||||||
<ControlTheme x:Key="{x:Type WindowDrawnDecorations}" TargetType="WindowDrawnDecorations">
|
<ControlTheme x:Key="{x:Type WindowDrawnDecorations}" TargetType="WindowDrawnDecorations">
|
||||||
<Setter Property="DefaultTitleBarHeight" Value="32" />
|
<Setter Property="DefaultTitleBarHeight" Value="32" />
|
||||||
<Setter Property="DefaultFrameThickness" Value="1" />
|
<Setter Property="DefaultFrameThickness" Value="4" />
|
||||||
<Setter Property="DefaultShadowThickness" Value="8" />
|
<!-- <Setter Property="DefaultShadowThickness" Value="8" /> -->
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<WindowDrawnDecorationsTemplate>
|
<WindowDrawnDecorationsTemplate>
|
||||||
<WindowDrawnDecorationsContent>
|
<WindowDrawnDecorationsContent>
|
||||||
@@ -189,16 +189,16 @@
|
|||||||
|
|
||||||
<!-- Hide caption buttons when the platform does not support the action -->
|
<!-- Hide caption buttons when the platform does not support the action -->
|
||||||
<Style Selector="^:not(:has-minimize) /template/ Button#PART_MinimizeButton">
|
<Style Selector="^:not(:has-minimize) /template/ Button#PART_MinimizeButton">
|
||||||
<Setter Property="IsVisible" Value="False"/>
|
<Setter Property="IsVisible" Value="False" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:not(:has-maximize) /template/ Button#PART_MaximizeButton">
|
<Style Selector="^:not(:has-maximize) /template/ Button#PART_MaximizeButton">
|
||||||
<Setter Property="IsVisible" Value="False"/>
|
<Setter Property="IsVisible" Value="False" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:not(:has-fullscreen) /template/ Button#PART_FullScreenButton">
|
<Style Selector="^:not(:has-fullscreen) /template/ Button#PART_FullScreenButton">
|
||||||
<Setter Property="IsVisible" Value="False"/>
|
<Setter Property="IsVisible" Value="False" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="^:not(:has-fullscreen) /template/ Button#PART_PopoverFullScreenButton">
|
<Style Selector="^:not(:has-fullscreen) /template/ Button#PART_PopoverFullScreenButton">
|
||||||
<Setter Property="IsVisible" Value="False"/>
|
<Setter Property="IsVisible" Value="False" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- Fullscreen: hide overlay and titlebar (popover takes over) -->
|
<!-- Fullscreen: hide overlay and titlebar (popover takes over) -->
|
||||||
@@ -214,4 +214,4 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<SolidColorBrush x:Key="WindowBackground">Transparent</SolidColorBrush>
|
||||||
|
<StaticResource x:Key="WindowBorderBrush" ResourceKey="SemiColorBorder" />
|
||||||
<StaticResource x:Key="WindowBorderShadow" ResourceKey="SemiShadowElevated" />
|
<StaticResource x:Key="WindowBorderShadow" ResourceKey="SemiShadowElevated" />
|
||||||
<StaticResource x:Key="TitleBarBackground" ResourceKey="SemiColorBackground0" />
|
<SolidColorBrush x:Key="TitleBarBackground">Transparent</SolidColorBrush>
|
||||||
|
|
||||||
<StaticResource x:Key="CaptionButtonPointeroverBackground" ResourceKey="SemiColorFill1" />
|
<StaticResource x:Key="CaptionButtonPointeroverBackground" ResourceKey="SemiColorFill1" />
|
||||||
<StaticResource x:Key="CaptionButtonPressedBackground" ResourceKey="SemiColorFill2" />
|
<StaticResource x:Key="CaptionButtonPressedBackground" ResourceKey="SemiColorFill2" />
|
||||||
@@ -9,4 +11,4 @@
|
|||||||
<StaticResource x:Key="CaptionButtonClosePressedBackground" ResourceKey="SemiColorDangerActive" />
|
<StaticResource x:Key="CaptionButtonClosePressedBackground" ResourceKey="SemiColorDangerActive" />
|
||||||
<StaticResource x:Key="CaptionButtonForeground" ResourceKey="SemiColorText1" />
|
<StaticResource x:Key="CaptionButtonForeground" ResourceKey="SemiColorText1" />
|
||||||
<StaticResource x:Key="CaptionButtonDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
<StaticResource x:Key="CaptionButtonDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<StaticResource x:Key="TitleBarBackground" ResourceKey="SemiColorWindow" />
|
<SolidColorBrush x:Key="WindowBackground">Transparent</SolidColorBrush>
|
||||||
|
<StaticResource x:Key="WindowBorderBrush" ResourceKey="SemiColorWindowText" />
|
||||||
|
<SolidColorBrush x:Key="TitleBarBackground">Transparent</SolidColorBrush>
|
||||||
|
|
||||||
<StaticResource x:Key="CaptionButtonPointeroverBackground" ResourceKey="SemiColorHotlight" />
|
<StaticResource x:Key="CaptionButtonPointeroverBackground" ResourceKey="SemiColorHotlight" />
|
||||||
<StaticResource x:Key="CaptionButtonPressedBackground" ResourceKey="SemiColorHotlight" />
|
<StaticResource x:Key="CaptionButtonPressedBackground" ResourceKey="SemiColorHotlight" />
|
||||||
@@ -8,4 +10,4 @@
|
|||||||
<StaticResource x:Key="CaptionButtonClosePressedBackground" ResourceKey="SemiColorHotlight" />
|
<StaticResource x:Key="CaptionButtonClosePressedBackground" ResourceKey="SemiColorHotlight" />
|
||||||
<StaticResource x:Key="CaptionButtonForeground" ResourceKey="SemiColorWindowText" />
|
<StaticResource x:Key="CaptionButtonForeground" ResourceKey="SemiColorWindowText" />
|
||||||
<StaticResource x:Key="CaptionButtonDisabledForeground" ResourceKey="SemiColorGrayText" />
|
<StaticResource x:Key="CaptionButtonDisabledForeground" ResourceKey="SemiColorGrayText" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
|
<SolidColorBrush x:Key="WindowBackground">Transparent</SolidColorBrush>
|
||||||
|
<StaticResource x:Key="WindowBorderBrush" ResourceKey="SemiColorBorder" />
|
||||||
<StaticResource x:Key="WindowBorderShadow" ResourceKey="SemiShadowElevated" />
|
<StaticResource x:Key="WindowBorderShadow" ResourceKey="SemiShadowElevated" />
|
||||||
<StaticResource x:Key="TitleBarBackground" ResourceKey="SemiColorBackground0" />
|
<SolidColorBrush x:Key="TitleBarBackground">Transparent</SolidColorBrush>
|
||||||
|
|
||||||
<StaticResource x:Key="CaptionButtonPointeroverBackground" ResourceKey="SemiColorFill1" />
|
<StaticResource x:Key="CaptionButtonPointeroverBackground" ResourceKey="SemiColorFill1" />
|
||||||
<StaticResource x:Key="CaptionButtonPressedBackground" ResourceKey="SemiColorFill2" />
|
<StaticResource x:Key="CaptionButtonPressedBackground" ResourceKey="SemiColorFill2" />
|
||||||
@@ -9,4 +11,4 @@
|
|||||||
<StaticResource x:Key="CaptionButtonClosePressedBackground" ResourceKey="SemiColorDangerActive" />
|
<StaticResource x:Key="CaptionButtonClosePressedBackground" ResourceKey="SemiColorDangerActive" />
|
||||||
<StaticResource x:Key="CaptionButtonForeground" ResourceKey="SemiColorText1" />
|
<StaticResource x:Key="CaptionButtonForeground" ResourceKey="SemiColorText1" />
|
||||||
<StaticResource x:Key="CaptionButtonDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
<StaticResource x:Key="CaptionButtonDisabledForeground" ResourceKey="SemiColorDisabledText" />
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
Reference in New Issue
Block a user