Skip to content

Commit

Permalink
Rename nuget and namespace to remove company name from theme (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldumais authored Jan 10, 2025
1 parent 1719cd8 commit 182a9a6
Show file tree
Hide file tree
Showing 30 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ jobs:
shell: pwsh
run: |
$PackageVersion = '${{ needs.preflight.outputs.package-version }}'
$csprojPath = "src\Devolutions.MacOS.Avalonia.Theme\Devolutions.MacOS.Avalonia.Theme.csproj"
$csprojPath = "src\MacOS.Avalonia.Theme\MacOS.Avalonia.Theme.csproj"
$csprojContent = Get-Content $csprojPath -Raw
$csprojContent = $csprojContent -Replace '(<Version>).*?(</Version>)', "<Version>$PackageVersion</Version>"
Set-Content -Path $csprojPath -Value $csprojContent -Encoding UTF8
- name: Build nuget package
shell: pwsh
run: |
& dotnet pack .\src\Devolutions.MacOS.Avalonia.Theme -o package
& dotnet pack .\src\MacOS.Avalonia.Theme -o package
- name: Code sign nuget contents
shell: pwsh
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Custom Avalonia Themes developed by [Devolutions](https://devolutions.net/)

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Build Status](https://github.com/Devolutions/avalonia-themes/actions/workflows/build-package.yml/badge.svg?branch=master)](https://github.com/Devolutions/avalonia-themes/actions/workflows/build-package.yml)
[![NuGet Version](https://img.shields.io/nuget/vpre/Devolutions.MacOS.Avalonia.Theme)](https://www.nuget.org/packages/Devolutions.MacOS.Avalonia.Theme)
![NuGet Downloads](https://img.shields.io/nuget/dt/Devolutions.MacOS.Avalonia.Theme)
[![NuGet Version](https://img.shields.io/nuget/vpre/MacOS.Avalonia.Theme)](https://www.nuget.org/packages/MacOS.Avalonia.Theme)
![NuGet Downloads](https://img.shields.io/nuget/dt/MacOS.Avalonia.Theme)


## MacOS Theme [Work in Progress]
Expand Down Expand Up @@ -43,19 +43,19 @@ the goal is to create a theme that helps all of the Avalonia community to bring


## Installation
Install the Devolutions.MacOS.Avalonia.Theme package via [NuGet](https://www.nuget.org/packages/Devolutions.MacOS.Avalonia.Theme):
Install the MacOS.Avalonia.Theme package via [NuGet](https://www.nuget.org/packages/MacOS.Avalonia.Theme):
``` bash
Install-Package Devolutions.MacOS.Avalonia.Theme
Install-Package MacOS.Avalonia.Theme
```
or .NET
```bash
dotnet add package Devolutions.MacOS.Avalonia.Theme
dotnet add package MacOS.Avalonia.Theme
```
In your App.axaml, replace the existing theme (e.g. `<FluentTheme />` or `<SimpleTheme />`) with the macOS theme:
``` xaml
<Application ...>
<Application.Styles>
<StyleInclude Source="avares://Devolutions.MacOS.Avalonia.Theme/MacOSTheme.axaml" />
<StyleInclude Source="avares://MacOS.Avalonia.Theme/MacOSTheme.axaml" />
</Application.Styles>
</Application>
```
Expand Down
2 changes: 1 addition & 1 deletion avalonia-themes.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleApp", "samples\SampleApp\SampleApp.csproj", "{8FB0A38F-D80A-45A1-9796-FD22FDB14064}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MacOS.Avalonia.Theme", "src\Devolutions.MacOS.Avalonia.Theme\Devolutions.MacOS.Avalonia.Theme.csproj", "{052424E1-48F3-4D8E-A780-DEB4D33B4482}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MacOS.Avalonia.Theme", "src\MacOS.Avalonia.Theme\MacOS.Avalonia.Theme.csproj", "{052424E1-48F3-4D8E-A780-DEB4D33B4482}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7756B42B-13EB-4DC9-BA61-11997466D93C}"
EndProject
Expand Down
2 changes: 1 addition & 1 deletion samples/SampleApp/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@

<Application.Styles>
<!-- <FluentTheme /> -->
<StyleInclude Source="avares://Devolutions.MacOS.Avalonia.Theme/MacOSTheme.axaml" />
<StyleInclude Source="avares://MacOS.Avalonia.Theme/MacOSTheme.axaml" />
</Application.Styles>
</Application>
4 changes: 2 additions & 2 deletions samples/SampleApp/SampleApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.0"/>
<PackageReference Include="Svg.SourceGenerator.Skia" Version="2.0.0.4"/>
<PackageReference Include="Avalonia.Controls.Skia" Version="11.2.0.2"/>
<!-- <PackageReference Include="Devolutions.MacOS.Avalonia.Theme" Version="2024.12.4" /> -->
<!-- <PackageReference Include="MacOS.Avalonia.Theme" Version="2024.12.4" /> -->
</ItemGroup>

<ItemGroup>
Expand All @@ -36,6 +36,6 @@
<!-- Temporary link for development.
(To use the published nuget, uncomment PackageReference above (update version) or install with Nuget manager) -->
<ItemGroup>
<ProjectReference Include="..\..\src\Devolutions.MacOS.Avalonia.Theme\Devolutions.MacOS.Avalonia.Theme.csproj"/>
<ProjectReference Include="..\..\src\MacOS.Avalonia.Theme\MacOS.Avalonia.Theme.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
<Thickness x:Key="TreeViewItemChevronMargin">14, 0, 4, 0</Thickness>

<ImageBrush x:Key="StripedBackgroundBrush"
Source="avares://Devolutions.MacOS.Avalonia.Theme/Accents/Assets/Alternating_Row_Background_Light.png"
Source="avares://MacOS.Avalonia.Theme/Accents/Assets/Alternating_Row_Background_Light.png"
TileMode="Tile"
Stretch="None"
DestinationRect="0 0 40 40" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Avalonia;
using Avalonia.Data.Converters;

namespace Devolutions.MacOS.Avalonia.Theme.Converters;
namespace MacOS.Avalonia.Theme.Converters;

public class BooleanToChoiceConverter : IMultiValueConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Globalization;
using Avalonia.Data.Converters;

namespace Devolutions.MacOS.Avalonia.Theme.Converters;
namespace MacOS.Avalonia.Theme.Converters;

public class CharToMacOsPasswordCharConverter : IValueConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Globalization;
using Avalonia.Data.Converters;

namespace Devolutions.MacOS.Avalonia.Theme.Converters;
namespace MacOS.Avalonia.Theme.Converters;

public class RevealPasswordToFontSizeConverter : IMultiValueConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Globalization;
using Avalonia.Data.Converters;

namespace Devolutions.MacOS.Avalonia.Theme.Converters;
namespace MacOS.Avalonia.Theme.Converters;

public class SelectedIndexToPopupOffsetConverter : IMultiValueConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Globalization;
using Avalonia.Data.Converters;

namespace Devolutions.MacOS.Avalonia.Theme.Converters;
namespace MacOS.Avalonia.Theme.Converters;

public class TotalWidthConverter : IMultiValueConverter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
</ItemGroup>

<ItemGroup>
<AdditionalFiles Include="Converters/SelectedIndexToPopupOffsetConverter.cs" NamespaceName="Devolutions.MacOS.Avalonia.Theme.Converters" ClassName="IndexToOffsetConverters"/>
<AdditionalFiles Include="Converters/TotalWidthConverter.cs" NamespaceName="Devolutions.MacOS.Avalonia.Theme.Converters" ClassName="TotalWidthConverter"/>
<AdditionalFiles Include="Converters/SelectedIndexToPopupOffsetConverter.cs" NamespaceName="MacOS.Avalonia.Theme.Converters" ClassName="IndexToOffsetConverters"/>
<AdditionalFiles Include="Converters/TotalWidthConverter.cs" NamespaceName="MacOS.Avalonia.Theme.Converters" ClassName="TotalWidthConverter"/>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Styles xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:converters="clr-namespace:Devolutions.MacOS.Avalonia.Theme.Converters">
xmlns:converters="clr-namespace:MacOS.Avalonia.Theme.Converters">
<Styles.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand Down

0 comments on commit 182a9a6

Please sign in to comment.