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

New UI theme, Updated Windows Dependencies, Code cleanup, Improved debug experience #180

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
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: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"dotnet.preferCSharpExtension": true
}
10 changes: 5 additions & 5 deletions RepoZ.Api.Common/RepoZ.Api.Common.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ReleaseVersion>4.0</ReleaseVersion>
<Version>1.0.0.0</Version>
<ReleaseVersion>4.0</ReleaseVersion>
<Version>3.0.0.0</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="LibGit2Sharp" Version="0.25.4" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="LibGit2Sharp" Version="0.30.0" />
</ItemGroup>

<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions RepoZ.Api.Win/RepoZ.Api.Win.csproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ReleaseVersion>1.0</ReleaseVersion>
<Version>1.0.0.0</Version>
<ReleaseVersion>1.0</ReleaseVersion>
<Version>3.0.0.0</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Security.Permissions" Version="5.0.0" />
<PackageReference Include="System.Security.Permissions" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion RepoZ.Api/RepoZ.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ReleaseVersion>4.0</ReleaseVersion>
<Version>1.0.0.0</Version>
<Version>3.0.0.0</Version>
</PropertyGroup>

</Project>
26 changes: 23 additions & 3 deletions RepoZ.App.Win/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
</startup>
</configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.1.2" newVersion="4.0.1.2" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="ControlzEx" publicKeyToken="69f1c32f803d307e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
149 changes: 63 additions & 86 deletions RepoZ.App.Win/App.xaml
Original file line number Diff line number Diff line change
@@ -1,110 +1,87 @@
<Application x:Class="RepoZ.App.Win.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:RepoZ.App.Win"
xmlns:controls="clr-namespace:RepoZ.App.Win.Controls"
ShutdownMode="OnExplicitShutdown">
<Application.Resources>

<!--
<Application
x:Class="RepoZ.App.Win.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:RepoZ.App.Win.Controls"
xmlns:local="clr-namespace:RepoZ.App.Win"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
ShutdownMode="OnExplicitShutdown"
>
<Application.Resources>

<!--
Note that this application does not have a StartupUri declared, so no Window is automatically loaded.
Also, the ShutdownMode was set to explicit, so we have to close the application programmatically
-->

<ResourceDictionary>
<ResourceDictionary>

<!--
<!--
Integrate MahApps to Material Design Toolkit
https://github.com/ButchersBoy/MaterialDesignInXamlToolkit/wiki/MahApps.Metro-integration
-->

<ResourceDictionary.MergedDictionaries>
<ResourceDictionary.MergedDictionaries>

<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />

<!-- MahApps -->

<!-- MahApps -->
<!-- Material Design -->
<materialDesign:BundledTheme
BaseTheme="Inherit"
PrimaryColor="LightBlue"
SecondaryColor="LightBlue"
/>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />

<!-- Material Design -->
<!--<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />-->
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Dark.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.LightBlue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.LightBlue.xaml" />
<!-- Material Design: MahApps Compatibility -->
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Fonts.xaml" />
<!-- CRASHES?! <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Flyout.xaml" />-->

<!-- Material Design: MahApps Compatibility -->
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Fonts.xaml" />
<!-- CRASHES?! <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.MahApps;component/Themes/MaterialDesignTheme.MahApps.Flyout.xaml" />-->
<!-- merge NotifyIcon and related stuff into the application -->
<ResourceDictionary Source="NotifyIconResources.xaml" />

<!-- merge NotifyIcon and related stuff into the application -->
<ResourceDictionary Source="NotifyIconResources.xaml" />
</ResourceDictionary.MergedDictionaries>

</ResourceDictionary.MergedDictionaries>
<!-- MahApps Brushes -->

<!-- MahApps Brushes -->
<!-- Light/Dark MaterialDesign themes to MahApps -->
<!-- WindowTitleColorBrush = MaterialDesignPaper -->
<!-- IdealForegroundColorBrush = MaterialDesignBody -->

<!-- Light/Dark MaterialDesign themes to MahApps -->
<!-- WindowTitleColorBrush = MaterialDesignPaper -->
<!-- IdealForegroundColorBrush = MaterialDesignBody -->

<!-- Light -->
<!--
<!-- Light -->
<!--
<SolidColorBrush x:Key="WindowTitleColorBrush" Color="#FFfafafa"/>
<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="#DD000000"/>
-->

<!-- Dark -->
<SolidColorBrush x:Key="WindowTitleColorBrush"
Color="#FF303030" />
<SolidColorBrush x:Key="IdealForegroundColorBrush"
Color="#DDFFFFFF" />

<SolidColorBrush x:Key="HighlightBrush"
Color="{DynamicResource Primary700}" />
<SolidColorBrush x:Key="AccentColorBrush"
Color="{DynamicResource Primary500}" />
<!-- main accent -->
<SolidColorBrush x:Key="AccentColorBrush2"
Color="{DynamicResource Primary400}" />
<SolidColorBrush x:Key="AccentColorBrush3"
Color="{DynamicResource Primary300}" />
<SolidColorBrush x:Key="AccentColorBrush4"
Color="{DynamicResource Primary200}" />
<SolidColorBrush x:Key="AccentSelectedColorBrush"
Color="{DynamicResource Primary500Foreground}" />
<LinearGradientBrush x:Key="ProgressBrush"
EndPoint="0.001,0.5"
StartPoint="1.002,0.5">
<GradientStop Color="{DynamicResource Primary700}"
Offset="0" />
<GradientStop Color="{DynamicResource Primary300}"
Offset="1" />
</LinearGradientBrush>
<SolidColorBrush x:Key="CheckmarkFill"
Color="{DynamicResource Primary500}" />
<SolidColorBrush x:Key="RightArrowFill"
Color="{DynamicResource Primary500}" />
<SolidColorBrush x:Key="IdealForegroundDisabledBrush"
Color="{DynamicResource Primary500}"
Opacity="0.4" />

<Style TargetType="{x:Type controls:ZTextBox}" BasedOn="{StaticResource {x:Type TextBox}}" />

<Style TargetType="{x:Type controls:AcrylicContextMenu}" BasedOn="{StaticResource {x:Type ContextMenu}}" >
<Setter Property="Background" Value="#50000000" />
<Setter Property="FontSize" Value="13.5" />

</Style>


<Style TargetType="{x:Type controls:AcrylicMenuItem}" BasedOn="{StaticResource {x:Type MenuItem}}" >
<Setter Property="Background" Value="Transparent"/>
</Style>

</ResourceDictionary>

</Application.Resources>
<!-- Dark -->
<SolidColorBrush x:Key="WindowTitleColorBrush" Color="#FF303030" />
<SolidColorBrush x:Key="IdealForegroundColorBrush" Color="#DDFFFFFF" />

<!-- Repo Name colour -->
<SolidColorBrush x:Key="AccentColorBrush" Color="{DynamicResource Theme.PrimaryAccentColor}" />


<Style BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type controls:ZTextBox}" />

<Style BasedOn="{StaticResource {x:Type ContextMenu}}" TargetType="{x:Type controls:AcrylicContextMenu}">
<Setter Property="Background" Value="#50000000" />
<Setter Property="FontSize" Value="13.5" />

</Style>


<Style BasedOn="{StaticResource {x:Type MenuItem}}" TargetType="{x:Type controls:AcrylicMenuItem}">
<Setter Property="Background" Value="Transparent" />
</Style>

</ResourceDictionary>

</Application.Resources>

</Application>
11 changes: 7 additions & 4 deletions RepoZ.App.Win/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
using System;
using System;
using System.Data;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
using Hardcodet.Wpf.TaskbarNotification;
using RepoZ.Api.Common;
using RepoZ.Api.Common.Git;
using RepoZ.Api.Common.IO;
using RepoZ.Api.Git;
using RepoZ.Api.IO;
using RepoZ.Api.Win.IO;
using RepoZ.Api.Win.PInvoke.Explorer;
using RepoZ.App.Win.i18n;
using RepoZ.Ipc;
using TinyIoC;
using Hardcodet.Wpf.TaskbarNotification;
using TinySoup.Model;
Expand Down Expand Up @@ -58,7 +61,7 @@ protected override void OnStartup(StartupEventArgs e)

Application.Current.Resources.MergedDictionaries[0] = ResourceDictionaryTranslationService.ResourceDictionary;

_notifyIcon = (TaskbarIcon)FindResource("NotifyIcon");
_notifyIcon = (TaskbarIcon) FindResource("NotifyIcon");

var container = TinyIoCContainer.Current;

Expand Down Expand Up @@ -179,8 +182,8 @@ private async Task CheckForUpdatesAsync()

AvailableUpdate = updates.FirstOrDefault();

_updateTimer.Change((int)TimeSpan.FromHours(2).TotalMilliseconds, Timeout.Infinite);
}
_updateTimer.Change((int) TimeSpan.FromHours(2).TotalMilliseconds, Timeout.Infinite);
}

protected static void RefreshTimerCallback(object state)
{
Expand Down
Loading
Loading