Ruben 4 лет назад
Родитель
Сommit
a58b4d3321

+ 1 - 0
src/PicView/App.axaml

@@ -9,6 +9,7 @@
 
     <Application.Styles>
         <StyleInclude Source="/Styles/Text.xaml" />
+        <StyleInclude Source="/Styles/Button.xaml" />
     </Application.Styles>
 
 </Application>

BIN
src/PicView/Assets/Fonts/Roboto-Black.ttf


BIN
src/PicView/Assets/Fonts/Roboto-Bold.ttf


BIN
src/PicView/Assets/Fonts/Roboto-Italic.ttf


BIN
src/PicView/Assets/Fonts/Roboto-Light.ttf


BIN
src/PicView/Assets/Fonts/Roboto-LightItalic.ttf


BIN
src/PicView/Assets/Fonts/Roboto-Medium.ttf


BIN
src/PicView/Assets/Fonts/Roboto-MediumItalic.ttf


BIN
src/PicView/Assets/Fonts/Roboto-Regular.ttf


+ 53 - 0
src/PicView/PicView - Backup.csproj

@@ -0,0 +1,53 @@
+<Project Sdk="Microsoft.NET.Sdk">
+	<PropertyGroup>
+		<OutputType>WinExe</OutputType>
+		<TargetFramework>net6.0</TargetFramework>
+		<Nullable>enable</Nullable>
+		<ApplicationIcon>Assets\PicView\icon__Q6k_icon.ico</ApplicationIcon>
+		<PackageIcon>PicViewIcon.png</PackageIcon>
+		<ImplicitUsings>enable</ImplicitUsings>
+		<AssemblyName>PicView</AssemblyName>
+		<PlatformTarget>AnyCPU</PlatformTarget>
+	</PropertyGroup>
+	<ItemGroup>
+		<Folder Include="Assets\Fonts" />
+		<Folder Include="Assets\SvgIcons\" />
+		<Folder Include="Models\" />
+		<AvaloniaResource Include="Assets\**" />
+		<AvaloniaResource Include="Assets\Fonts\*" />
+	</ItemGroup>
+	<ItemGroup>
+	  <AvaloniaXaml Include="Styles\Text.xaml" />
+	</ItemGroup>
+	<ItemGroup>
+		<Content Include="Assets\PicView\icon__Q6k_icon.ico" />
+	</ItemGroup>
+	<ItemGroup>
+		<PackageReference Include="Avalonia" Version="0.10.11-rc.1" />
+		<PackageReference Include="Avalonia.Desktop" Version="0.10.11-rc.1" />
+		<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
+		<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.11-rc.1" />
+		<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.11-rc.1" />
+		<PackageReference Include="Avalonia.Xaml.Behaviors" Version="0.10.11.1-rc.1" />
+	</ItemGroup>
+	<ItemGroup>
+		<Resource Include="Resources\icon__Q6k_icon.ico" />
+	</ItemGroup>
+	<ItemGroup>
+	  <Compile Update="Styles\Themes\Dark\FluentDark.cs">
+	    <DependentUpon>FluentDark.axaml</DependentUpon>
+	  </Compile>
+	  <Compile Update="Views\CustomTitleBars\WinTitleBar.axaml.cs">
+	    <DependentUpon>WinTitleBar.axaml</DependentUpon>
+	  </Compile>
+	  <Compile Update="UserControls\PicBox.axaml.cs">
+	    <DependentUpon>PicBox.axaml</DependentUpon>
+	  </Compile>
+	</ItemGroup>
+	<ItemGroup>
+		<None Update="Assets\PicView\PicViewIcon.png">
+			<Pack>True</Pack>
+			<PackagePath>\</PackagePath>
+		</None>
+	</ItemGroup>
+</Project>

+ 4 - 3
src/PicView/PicView.csproj

@@ -17,6 +17,7 @@
 		<AvaloniaResource Include="Assets\Fonts\*" />
 	</ItemGroup>
 	<ItemGroup>
+	  <AvaloniaXaml Include="Styles\Button.xaml" />
 	  <AvaloniaXaml Include="Styles\Text.xaml" />
 	</ItemGroup>
 	<ItemGroup>
@@ -30,9 +31,6 @@
 		<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.11-rc.1" />
 		<PackageReference Include="Avalonia.Xaml.Behaviors" Version="0.10.11.1-rc.1" />
 	</ItemGroup>
-	<ItemGroup>
-		<Resource Include="Resources\icon__Q6k_icon.ico" />
-	</ItemGroup>
 	<ItemGroup>
 	  <Compile Update="Styles\Themes\Dark\FluentDark.cs">
 	    <DependentUpon>FluentDark.axaml</DependentUpon>
@@ -49,5 +47,8 @@
 			<Pack>True</Pack>
 			<PackagePath>\</PackagePath>
 		</None>
+		<None Update="ContextMenus\MainCM.xaml">
+		  <Generator>MSBuild:Compile</Generator>
+		</None>
 	</ItemGroup>
 </Project>

+ 6 - 0
src/PicView/Styles/Button.xaml

@@ -0,0 +1,6 @@
+<Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+
+    <Style Selector="Button.accent:pointerover /template/ ContentPresenter#PART_ContentPresenter">
+        <Setter Property="Background" Value="{DynamicResource AccentColorBrush}" />
+    </Style>
+</Styles>

+ 3 - 3
src/PicView/Styles/Text.xaml

@@ -1,7 +1,7 @@
 <Styles xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
-    <Style Selector="TextBox">
-        <Setter Property="FontSize" Value="13" />
-        <!--<Setter Property="FontFamily" Value="IBM Plex Mono Medium" />-->
+    <Style Selector="TextBox, Label, Button">
+        <Setter Property="FontSize" Value="12" />
+        <Setter Property="FontFamily" Value="avares://PicView/Assets/Fonts#Roboto" />
     </Style>
 </Styles>

+ 2 - 2
src/PicView/Styles/Themes/Dark/FluentDark.axaml

@@ -42,10 +42,10 @@
 
         <ImageBrush
             BitmapInterpolationMode="HighQuality"
-            DestinationRect="0,0,50,50"
+            DestinationRect="0,0,100,100"
             Opacity=".9"
             Source="\Assets\noisy-texture-200x200-o4-d31-c-161616-t0.png"
-            SourceRect="0,0,100,100"
+            SourceRect="0,0,200,200"
             Stretch="Fill"
             TileMode="FlipXY"
             x:Key="NoiseBg" />

+ 0 - 1
src/PicView/Views/CustomTitleBars/WinTitleBar.axaml

@@ -121,7 +121,6 @@
 
         <TextBlock
             Background="{StaticResource BackgroundSubtleHighlightBrush}"
-            FontFamily="Inter"
             FontSize="12"
             FontWeight="Bold"
             Height="30"

+ 1 - 3
src/PicView/Views/MainWindow.axaml

@@ -25,9 +25,7 @@
     <Border
         BorderBrush="{StaticResource BorderBrush}"
         BorderThickness="1"
-        ClipToBounds="True"
-        CornerRadius="5"
-        Padding="1">
+        CornerRadius="2">
         <DockPanel>
             <customTitleBars:WinTitleBar DockPanel.Dock="Top" />
             <Rectangle