Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
90a34dc
Update MaterialDesignThemes.MahApps
gabriel-vanca Sep 6, 2024
472869d
Material 3 Theme + Update Time conversion to use CultureInfo.Invaria…
gabriel-vanca Sep 6, 2024
f88e26b
Some additional comments and styling
gabriel-vanca Sep 6, 2024
2b0b85d
App.xaml.cs Code cleanup
gabriel-vanca Sep 6, 2024
4745d23
MainWindow.xaml.cs code cleanup
gabriel-vanca Sep 6, 2024
4e3da1d
App.xaml cleanup
gabriel-vanca Sep 6, 2024
1504068
MainWindow.xaml Cleanup
gabriel-vanca Sep 6, 2024
aa16088
this undo
gabriel-vanca Sep 10, 2024
28224b1
Update MahApps version
gabriel-vanca Sep 14, 2024
8715816
New Theme
gabriel-vanca Sep 16, 2024
d659c58
Removing deprecated Controls.
gabriel-vanca Sep 16, 2024
78dd47b
Fixed Hotkey bug. Deprecated more code.
gabriel-vanca Sep 17, 2024
439c914
Enabled manual MainWindow resize
gabriel-vanca Sep 17, 2024
3ea7d41
HotKey adjustments
gabriel-vanca Sep 17, 2024
ed4e768
Taskbar logic simplification
gabriel-vanca Sep 17, 2024
04cb53d
Simplified Hotkey service
gabriel-vanca Sep 17, 2024
ea77de9
Code Cleanup
gabriel-vanca Sep 17, 2024
4858b06
Escape key code logic simplification
gabriel-vanca Sep 18, 2024
4f0a34e
code cleanup & fixes
gabriel-vanca Sep 18, 2024
3a67a4d
App.xaml.cs reformat
gabriel-vanca Sep 18, 2024
d556ac2
App.xaml.cs indentation
gabriel-vanca Sep 19, 2024
4548e61
notes
gabriel-vanca Sep 19, 2024
4ed3da5
fixed flashing problem
gabriel-vanca Sep 19, 2024
8442640
code cleanup
gabriel-vanca Sep 19, 2024
0db30e2
code cleanup
gabriel-vanca Sep 19, 2024
c817ac3
UI cleaning
gabriel-vanca Sep 19, 2024
e906dbf
UI fixes and crashing notes
gabriel-vanca Sep 19, 2024
a6be869
Unpin button (not implemented)
gabriel-vanca Sep 19, 2024
5b04722
Fixes StayActiveWindow
gabriel-vanca Sep 19, 2024
24ab2bd
Fixed critical Thread safety issue
gabriel-vanca Sep 19, 2024
7b94eab
icons and fonts
gabriel-vanca Sep 20, 2024
9db900a
Merge remote-tracking branch 'upstream/main' into Fluent_UI
gabriel-vanca Sep 20, 2024
cfda8a7
font inclusion fix
gabriel-vanca Sep 20, 2024
d895559
XAML fixes
gabriel-vanca Sep 20, 2024
50b2a29
theme
gabriel-vanca Sep 20, 2024
b5280e9
icon fix
gabriel-vanca Sep 20, 2024
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
2 changes: 2 additions & 0 deletions RepoM.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=appsettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=bindable/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=coenm/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=comparers/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=decoratee/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Devops/@EntryIndexedValue">True</s:Boolean>
Expand All @@ -11,5 +12,6 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=pullrequest/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=pullrequests/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Scriban/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Segoe/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Unregister/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Untracked/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public void Add(IRepository repository, IRepositoryMonitor repositoryMonitor)
throw new NotImplementedException("We expect a Repository object.");
}

// TODO: crashes here
_dispatcher.Invoke(() =>
{
var view = new RepositoryViewModel(repo, repositoryMonitor);
Expand Down
6 changes: 4 additions & 2 deletions src/RepoM.Api/Git/DefaultRepositoryMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ private void ScanRepositoriesFromStoreAsync()
foreach (var head in _repositoryStore.Get())
{
_logger.LogDebug("{Method} - repo {Head}", nameof(ScanRepositoriesFromStoreAsync), head);
OnCheckKnownRepository(head, KnownRepositoryNotifications.WhenFound);
_ = OnCheckKnownRepository(head, KnownRepositoryNotifications.WhenFound);
}
});
}
Expand Down Expand Up @@ -198,6 +198,7 @@ public void Reset()
{
Stop();

// TODO: this is not thread safe. Needs urgent fixing
foreach (IRepositoryObserver observer in _repositoryObservers.Values)
{
// ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract
Expand Down Expand Up @@ -261,6 +262,7 @@ private void CreateRepositoryObserver(IRepository repo, string path)

if (!_repositoryObservers.TryAdd(path, observer))
{
// TODO NOT THREAD SAFE
observer.Dispose();
return;
}
Expand Down Expand Up @@ -304,7 +306,7 @@ private void OnRepositoryChangeDetected(IRepository repo)
private void OnRepositoryObserverChange(IRepository repository)
{
_logger.LogDebug("{Method} - repo {Path}", nameof(OnRepositoryObserverChange), repository.Path);
OnCheckKnownRepository(repository.Path, KnownRepositoryNotifications.WhenFound | KnownRepositoryNotifications.WhenNotFound);
_ = OnCheckKnownRepository(repository.Path, KnownRepositoryNotifications.WhenFound | KnownRepositoryNotifications.WhenNotFound);
}

private void DestroyRepositoryObserver(string path)
Expand Down
7 changes: 2 additions & 5 deletions src/RepoM.App/ActionMenuCore/RepositoryTagsFactoryV2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,5 @@ public RepositoryTagsFactoryV2(
_filename = fileSystem.Path.Combine(appDataPathProvider.AppDataPath, "TagsV2.yaml");
}

public Task<IEnumerable<string>> GetTagsAsync(Repository repository)
{
return _newStyleActionMenuFactory.GetTagsAsync(repository, _filename);
}
}
public Task<IEnumerable<string>> GetTagsAsync(Repository repository) => _newStyleActionMenuFactory.GetTagsAsync(repository,_filename);
}
147 changes: 46 additions & 101 deletions src/RepoM.App/App.xaml
Original file line number Diff line number Diff line change
@@ -1,109 +1,54 @@
<Application x:Class="RepoM.App.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:RepoM.App.Controls"
ShutdownMode="OnExplicitShutdown">
<Application
x:Class="RepoM.App.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
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>

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

<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" />


<!-- MahApps -->

<!-- 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" />-->

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

</ResourceDictionary.MergedDictionaries>

<!-- MahApps Brushes -->

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

<!-- 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>
<ResourceDictionary>

<!-- <FontFamily x:Key="SegoeFluentIcons">pack://application:,,,/RepoM;component/Resources/Fonts/#Segoe Fluent Icons</FontFamily> -->

<!-- https://github.com/adobe-fonts/source-code-pro -->


<ResourceDictionary.MergedDictionaries>

<ResourceDictionary Source="pack://application:,,,/RepoM;component/Resources/Variables.xaml" />
<ResourceDictionary Source="pack://application:,,,/RepoM;component/Resources/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/RepoM;component/Resources/Typography.xaml" />
<ResourceDictionary Source="pack://application:,,,/RepoM;component/Resources/StaticColors.xaml" />
<ResourceDictionary Source="pack://application:,,,/RepoM;component/Resources/Accent.xaml" />
<ResourceDictionary Source="pack://application:,,,/RepoM;component/Resources/Palette.xaml" />

<ResourceDictionary x:Name="Dark" Source="pack://application:,,,/RepoM;component/Resources/Theme/Dark.xaml" />
<ResourceDictionary x:Name="Light" Source="pack://application:,,,/RepoM;component/Resources/Theme/Light.xaml" />
<ResourceDictionary x:Name="HighContrastWhite" Source="pack://application:,,,/RepoM;component/Resources/Theme/HCWhite.xaml" />
<ResourceDictionary x:Name="HighContrastBlack" Source="pack://application:,,,/RepoM;component/Resources/Theme/HCBlack.xaml" />
<ResourceDictionary x:Name="HighContrastCustom1" Source="pack://application:,,,/RepoM;component/Resources/Theme/HC1.xaml" />
<ResourceDictionary x:Name="HighContrastCustom2" Source="pack://application:,,,/RepoM;component/Resources/Theme/HC2.xaml" />

<!-- Set the default theme just in case. We load the correct theme later -->
<ui:ThemesDictionary Theme="Dark" />

<ui:ControlsDictionary />

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

</ResourceDictionary.MergedDictionaries>


</ResourceDictionary>

</Application.Resources>

</Application>
Loading