Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Actipro Modern Theme #1118

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
3 changes: 2 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
<Project>
<ItemGroup>
<PackageVersion Include="ActiproSoftware.Controls.Avalonia" Version="23.1.3"/>
<PackageVersion Include="ActiproSoftware.Controls.Avalonia.Themes.DataGrid" Version="23.1.3"/>
<PackageVersion Include="Ardalis.SmartEnum" Version="2.1.0"/>
<PackageVersion Include="AdysTech.CredentialManager" Version="2.6.0"/>
<PackageVersion Include="AspNet.Security.OAuth.GitHub" Version="8.0.0"/>
<PackageVersion Include="AutoMapper" Version="13.0.1"/>
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.0.9"/>
<PackageVersion Include="Avalonia.Desktop" Version="11.0.9"/>
<PackageVersion Include="Avalonia.Diagnostics" Version="11.0.9"/>
<PackageVersion Include="Avalonia.Themes.Fluent" Version="11.0.9"/>
<PackageVersion Include="Avalonia.Xaml.Behaviors" Version="11.0.6"/>
<PackageVersion Include="Avalonia.Xaml.Interactivity" Version="11.0.6"/>
<PackageVersion Include="Bogus" Version="35.4.0"/>
Expand Down
Binary file modified source/Gnomeshade.Avalonia.Core/Help/licenses.json
Binary file not shown.
10 changes: 10 additions & 0 deletions source/Gnomeshade.Avalonia.Core/Help/override.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
[
{
"Id": "ActiproSoftware.Controls.Avalonia",
"Version": "23.1.3",
"License": "https://www.nuget.org/packages/ActiproSoftware.Controls.Avalonia/23.1.3/License"
},
{
"Id": "ActiproSoftware.Controls.Avalonia.Themes.DataGrid",
"Version": "23.1.3",
"License": "https://www.nuget.org/packages/ActiproSoftware.Controls.Avalonia/23.1.3/License"
},
{
"Id": "Ardalis.SmartEnum",
"Version": "2.1.0",
Expand Down
42 changes: 8 additions & 34 deletions source/Gnomeshade.Desktop/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
xmlns:products="clr-namespace:Gnomeshade.WebApi.Models.Products;assembly=Gnomeshade.WebApi.Models"
xmlns:owners="clr-namespace:Gnomeshade.WebApi.Models.Owners;assembly=Gnomeshade.WebApi.Models"
xmlns:loans="clr-namespace:Gnomeshade.WebApi.Models.Loans;assembly=Gnomeshade.WebApi.Models"
xmlns:actipro="http://schemas.actiprosoftware.com/avaloniaui"
xmlns:generation="clr-namespace:ActiproSoftware.UI.Avalonia.Themes.Generation;assembly=ActiproSoftware.Avalonia.Shared"
x:Class="Gnomeshade.Desktop.App"
RequestedThemeVariant="Dark">
RequestedThemeVariant="Default">

Check warning on line 13 in source/Gnomeshade.Desktop/App.axaml

View check run for this annotation

Codecov / codecov/patch

source/Gnomeshade.Desktop/App.axaml#L13

Added line #L13 was not covered by tests

<Application.DataTemplates>
<core:ViewLocator x:TypeArguments="desktop:App" />
Expand Down Expand Up @@ -49,41 +51,17 @@
<TextBlock Text="{Binding Name}" />
</DataTemplate>
</Application.DataTemplates>

<Application.Resources>
<SolidColorBrush x:Key="DataGridColumnHeaderBackgroundBrush" />
<SolidColorBrush x:Key="DataGridGridLinesBrush" />
<x:Double x:Key="DataGridSortIconMinWidth">0</x:Double>

<!-- Override default values for expander -->
<Thickness x:Key="ExpanderChevronMargin">0</Thickness>
<x:Double x:Key="FlyoutThemeMinWidth">0</x:Double>
<SolidColorBrush x:Key="ExpanderHeaderBackground" />
<SolidColorBrush x:Key="ExpanderHeaderBackgroundPointerOver" />
<SolidColorBrush x:Key="ExpanderChevronBackground" />
</Application.Resources>

<Application.Styles>
<FluentTheme />
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml" />
<actipro:ModernTheme Includes="NativeDataGrid">

Check warning on line 55 in source/Gnomeshade.Desktop/App.axaml

View check run for this annotation

Codecov / codecov/patch

source/Gnomeshade.Desktop/App.axaml#L55

Added line #L55 was not covered by tests
<actipro:ModernTheme.Definition>
<generation:ThemeDefinition BaseFontSize="13" UserInterfaceDensity="Compact" />

Check warning on line 57 in source/Gnomeshade.Desktop/App.axaml

View check run for this annotation

Codecov / codecov/patch

source/Gnomeshade.Desktop/App.axaml#L57

Added line #L57 was not covered by tests
</actipro:ModernTheme.Definition>
</actipro:ModernTheme>

<Style Selector="DataGridColumnHeader">
<Setter Property="Padding" Value="5 0" />
</Style>

<Style Selector="DataGridCell">
<Setter Property="MinHeight" Value="20" />
<Setter Property="FontSize" Value="14" />
</Style>

<Style Selector="DataGridCell:focus Grid#FocusVisual">
<Setter Property="IsVisible" Value="False" />
</Style>

<Style Selector="DataGridRow:selected /template/ Rectangle#BackgroundRectangle">
<Setter Property="Fill" Value="#05769d" />
</Style>

<Style Selector="AutoCompleteBox TextBox#PART_TextBox">
<Setter Property="UseFloatingWatermark" Value="True" />
</Style>
Expand Down Expand Up @@ -114,9 +92,5 @@
<Setter Property="MinWidth" Value="150" />
<Setter Property="UseFloatingWatermark" Value="True" />
</Style>

<Style Selector="Expander ToggleButton">
<Setter Property="Padding" Value="0" />
</Style>
</Application.Styles>
</Application>
Binary file removed source/Gnomeshade.Desktop/Assets/Hack-Regular.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 2 additions & 1 deletion source/Gnomeshade.Desktop/Gnomeshade.Desktop.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ActiproSoftware.Controls.Avalonia" />
<PackageReference Include="ActiproSoftware.Controls.Avalonia.Themes.DataGrid" />
<PackageReference Include="AdysTech.CredentialManager" />
<PackageReference Include="Avalonia.Desktop" />
<PackageReference Include="Avalonia.Themes.Fluent" />
<PackageReference Include="Avalonia.Xaml.Behaviors" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" />
<PackageReference Include="Serilog" />
Expand Down
13 changes: 1 addition & 12 deletions source/Gnomeshade.Desktop/Views/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
x:Class="Gnomeshade.Desktop.Views.MainWindow"
Icon="/Assets/avalonia-logo.ico"
Title="Gnomeshade"
FontFamily="/Assets/Inconsolata-Regular.ttf"

WindowStartupLocation="CenterScreen"
ExtendClientAreaToDecorationsHint="False"
Expand All @@ -23,18 +22,8 @@
x:DataType="core:MainWindowViewModel">

<Panel>
<ExperimentalAcrylicBorder IsHitTestVisible="False">
<ExperimentalAcrylicBorder.Material>
<ExperimentalAcrylicMaterial
BackgroundSource="Digger"
TintColor="Black"
TintOpacity="1"
MaterialOpacity="0.65" />
</ExperimentalAcrylicBorder.Material>
</ExperimentalAcrylicBorder>

<Grid RowDefinitions="Auto,*,Auto">
<Menu DockPanel.Dock="Top" FontSize="18">
<Menu DockPanel.Dock="Top">

Check warning on line 26 in source/Gnomeshade.Desktop/Views/MainWindow.axaml

View check run for this annotation

Codecov / codecov/patch

source/Gnomeshade.Desktop/Views/MainWindow.axaml#L26

Added line #L26 was not covered by tests
<MenuItem Header="_File">
<MenuItem
x:Name="Logout" Header="_Logout"
Expand Down
104 changes: 47 additions & 57 deletions source/Gnomeshade.Desktop/Views/Transactions/TransactionView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,52 +12,50 @@
x:DataType="transactions:TransactionViewModel">

<Grid RowDefinitions="*" ColumnDefinitions="Auto,Auto,Auto,Auto,*" x:Name="Container">
<Expander Grid.Column="0" ExpandDirection="Right" VerticalAlignment="Stretch" IsExpanded="True">
<StackPanel Orientation="Vertical" Spacing="5">
<UserControl Content="{Binding Filter, Mode=OneWay}" />
<StackPanel Grid.Column="0" Orientation="Vertical" Spacing="5">
<UserControl Content="{Binding Filter, Mode=OneWay}" />

<Grid ColumnDefinitions="*, *" RowDefinitions="Auto, 5, Auto, Auto, Auto">
<Button
Grid.Row="0" Grid.Column="0"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsEnabled="{Binding CanRefresh}" Command="{Binding RefreshAsync}">
Refresh
</Button>
<Button
Grid.Row="0" Grid.Column="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsEnabled="{Binding CanDelete}" Command="{Binding DeleteSelectedAsync}">
Delete Selected
</Button>
<Button
Grid.Row="2" Grid.Column="0"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsEnabled="{Binding CanSelectSource}" Command="{Binding SelectSource}">
Select Source
</Button>
<Button
Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsEnabled="{Binding CanSelectTarget}" Command="{Binding SelectTarget}">
Select Target
</Button>
<Button
Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
Command="{Binding ClearMerge}">
Clear
</Button>
<Button
Grid.Row="4" Grid.Column="0" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsEnabled="{Binding Merge.CanMerge}" Command="{Binding Merge.MergeAsync}">
Merge
</Button>
<Button
Grid.Row="4" Grid.Column="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsEnabled="{Binding Refund.CanRefund}" Command="{Binding Refund.RefundAsync}">
Refund
</Button>
</Grid>
</StackPanel>
</Expander>
<Grid ColumnDefinitions="*, *" RowDefinitions="Auto, 5, Auto, Auto, Auto">
<Button
Grid.Row="0" Grid.Column="0"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsEnabled="{Binding CanRefresh}" Command="{Binding RefreshAsync}">
Refresh
</Button>
<Button
Grid.Row="0" Grid.Column="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsEnabled="{Binding CanDelete}" Command="{Binding DeleteSelectedAsync}">
Delete Selected
</Button>
<Button
Grid.Row="2" Grid.Column="0"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsEnabled="{Binding CanSelectSource}" Command="{Binding SelectSource}">
Select Source
</Button>
<Button
Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsEnabled="{Binding CanSelectTarget}" Command="{Binding SelectTarget}">
Select Target
</Button>
<Button
Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
Command="{Binding ClearMerge}">
Clear
</Button>
<Button
Grid.Row="4" Grid.Column="0" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsEnabled="{Binding Merge.CanMerge}" Command="{Binding Merge.MergeAsync}">
Merge
</Button>
<Button
Grid.Row="4" Grid.Column="1" HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
IsEnabled="{Binding Refund.CanRefund}" Command="{Binding Refund.RefundAsync}">
Refund
</Button>
</Grid>
</StackPanel>

<Grid Grid.Column="2" ColumnDefinitions="*" RowDefinitions="*, Auto">
<DataGrid
Expand All @@ -70,18 +68,10 @@
AutoGenerateColumns="False" IsReadOnly="False"
CanUserReorderColumns="False" CanUserResizeColumns="True" CanUserSortColumns="True">
<DataGrid.Columns>
<DataGridTemplateColumn Header="Rec" IsReadOnly="True" CanUserSort="False">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate DataType="transactions:TransactionOverview">
<LayoutTransformControl HorizontalAlignment="Center" VerticalAlignment="Top">
<CheckBox IsChecked="{Binding Reconciled}" Padding="0" IsEnabled="False" />
<LayoutTransformControl.LayoutTransform>
<ScaleTransform ScaleX="0.6" ScaleY="0.6" />
</LayoutTransformControl.LayoutTransform>
</LayoutTransformControl>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridCheckBoxColumn
x:DataType="transactions:TransactionOverview"
Header="Rec" IsReadOnly="True" CanUserSort="False"
Binding="{Binding Reconciled}" />
<DataGridTemplateColumn
Header="Date" IsReadOnly="True"
SortMemberPath="Date" CanUserSort="True">
Expand Down
29 changes: 20 additions & 9 deletions source/Gnomeshade.Desktop/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
"version": 2,
"dependencies": {
"net8.0": {
"ActiproSoftware.Controls.Avalonia": {
"type": "Direct",
"requested": "[23.1.3, )",
"resolved": "23.1.3",
"contentHash": "FJ8oTYb/WynFe1faXU8wcEgN8KH6va7BH/2fsp644r40qiQaaKQ9zOV1G2e/Je3TgfnEK/daF4z4ch2XjS6dVA==",
"dependencies": {
"Avalonia": "11.0.5"
}
},
"ActiproSoftware.Controls.Avalonia.Themes.DataGrid": {
"type": "Direct",
"requested": "[23.1.3, )",
"resolved": "23.1.3",
"contentHash": "gB+Jh+EzttayAV4z1I06M8W2181EF8yVqS59R+u4kNExLt4GZ1+E/v4UxhdfvVtE6K3tGOhUKeLTql2R5aibdQ==",
"dependencies": {
"ActiproSoftware.Controls.Avalonia": "[23.1.3]",
"Avalonia": "11.0.5",
"Avalonia.Controls.DataGrid": "11.0.5"
}
},
"AdysTech.CredentialManager": {
"type": "Direct",
"requested": "[2.6.0, )",
Expand All @@ -21,15 +41,6 @@
"Avalonia.X11": "11.0.9"
}
},
"Avalonia.Themes.Fluent": {
"type": "Direct",
"requested": "[11.0.9, )",
"resolved": "11.0.9",
"contentHash": "cRycTh9SZPHIi64c90xu0QI9d3jXMFY3VDWeIMHot+1Qek7Q9qYRXWmeJvStfYSYXDKOI7113IBJ7MIQiUshgg==",
"dependencies": {
"Avalonia": "11.0.9"
}
},
"Avalonia.Xaml.Behaviors": {
"type": "Direct",
"requested": "[11.0.6, )",
Expand Down
32 changes: 22 additions & 10 deletions tests/Gnomeshade.Desktop.Tests/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -628,9 +628,10 @@
"gnomeshade.desktop": {
"type": "Project",
"dependencies": {
"ActiproSoftware.Controls.Avalonia": "[23.1.3, )",
"ActiproSoftware.Controls.Avalonia.Themes.DataGrid": "[23.1.3, )",
"AdysTech.CredentialManager": "[2.6.0, )",
"Avalonia.Desktop": "[11.0.9, )",
"Avalonia.Themes.Fluent": "[11.0.9, )",
"Avalonia.Xaml.Behaviors": "[11.0.6, )",
"Gnomeshade.Avalonia.Core": "[1.0.0, )",
"Microsoft.Extensions.Configuration.Json": "[8.0.0, )",
Expand Down Expand Up @@ -661,6 +662,26 @@
"NodaTime": "[3.1.11, )"
}
},
"ActiproSoftware.Controls.Avalonia": {
"type": "CentralTransitive",
"requested": "[23.1.3, )",
"resolved": "23.1.3",
"contentHash": "FJ8oTYb/WynFe1faXU8wcEgN8KH6va7BH/2fsp644r40qiQaaKQ9zOV1G2e/Je3TgfnEK/daF4z4ch2XjS6dVA==",
"dependencies": {
"Avalonia": "11.0.5"
}
},
"ActiproSoftware.Controls.Avalonia.Themes.DataGrid": {
"type": "CentralTransitive",
"requested": "[23.1.3, )",
"resolved": "23.1.3",
"contentHash": "gB+Jh+EzttayAV4z1I06M8W2181EF8yVqS59R+u4kNExLt4GZ1+E/v4UxhdfvVtE6K3tGOhUKeLTql2R5aibdQ==",
"dependencies": {
"ActiproSoftware.Controls.Avalonia": "[23.1.3]",
"Avalonia": "11.0.5",
"Avalonia.Controls.DataGrid": "11.0.5"
}
},
"AdysTech.CredentialManager": {
"type": "CentralTransitive",
"requested": "[2.6.0, )",
Expand Down Expand Up @@ -690,15 +711,6 @@
"Avalonia.X11": "11.0.9"
}
},
"Avalonia.Themes.Fluent": {
"type": "CentralTransitive",
"requested": "[11.0.9, )",
"resolved": "11.0.9",
"contentHash": "cRycTh9SZPHIi64c90xu0QI9d3jXMFY3VDWeIMHot+1Qek7Q9qYRXWmeJvStfYSYXDKOI7113IBJ7MIQiUshgg==",
"dependencies": {
"Avalonia": "11.0.9"
}
},
"Avalonia.Xaml.Behaviors": {
"type": "CentralTransitive",
"requested": "[11.0.6, )",
Expand Down
Loading