Skip to content

Commit 791b5bd

Browse files
committed
Merge branch 'release/v8.21'
2 parents 7d3f228 + 19c42fb commit 791b5bd

File tree

200 files changed

+3783
-3368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+3783
-3368
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -604,3 +604,4 @@ build/*.zip
604604
build/*.tar.gz
605605
build/*.deb
606606
build/*.rpm
607+
build/*.AppImage

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ You can download the latest stable from [Releases](https://github.com/sourcegit-
4343

4444
This software creates a folder `$"{System.Environment.SpecialFolder.ApplicationData}/SourceGit"`, which is platform-dependent, to store user settings, downloaded avatars and crash logs.
4545

46-
| OS | PATH |
47-
| --- | --- |
48-
| Windows | `C:\Users\USER_NAME\AppData\Roaming\SourceGit` |
49-
| Linux | `${HOME}/.config/SourceGit` |
50-
| macOS | `${HOME}/Library/Application Support/SourceGit` |
46+
| OS | PATH |
47+
|---------|-------------------------------------------------|
48+
| Windows | `C:\Users\USER_NAME\AppData\Roaming\SourceGit` |
49+
| Linux | `${HOME}/.config/SourceGit` |
50+
| macOS | `${HOME}/Library/Application Support/SourceGit` |
5151

5252
For **Windows** users:
5353

@@ -74,13 +74,13 @@ For **Linux** users:
7474

7575
This app supports open repository in external tools listed in the table below.
7676

77-
| Tool | Windows | macOS | Linux | Environment Variable |
78-
| --- | --- | --- | --- | --- |
79-
| Visual Studio Code | YES | YES | YES | VSCODE_PATH |
80-
| Visual Studio Code - Insiders | YES | YES | YES | VSCODE_INSIDERS_PATH |
81-
| VSCodium | YES | YES | YES | VSCODIUM_PATH |
82-
| JetBrains Fleet | YES | YES | YES | FLEET_PATH |
83-
| Sublime Text | YES | YES | YES | SUBLIME_TEXT_PATH |
77+
| Tool | Windows | macOS | Linux | Environment Variable |
78+
|-------------------------------|---------|-------|-------|----------------------|
79+
| Visual Studio Code | YES | YES | YES | VSCODE_PATH |
80+
| Visual Studio Code - Insiders | YES | YES | YES | VSCODE_INSIDERS_PATH |
81+
| VSCodium | YES | YES | YES | VSCODIUM_PATH |
82+
| JetBrains Fleet | YES | YES | YES | FLEET_PATH |
83+
| Sublime Text | YES | YES | YES | SUBLIME_TEXT_PATH |
8484

8585
* You can set the given environment variable for special tool if it can NOT be found by this app automatically.
8686
* Installing `JetBrains Toolbox` will help this app to find other JetBrains tools installed on your device.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.20
1+
8.21

src/App.JsonCodeGen.cs

Lines changed: 58 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,67 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Text.Json;
23
using System.Text.Json.Serialization;
34

5+
using Avalonia.Controls;
6+
using Avalonia.Media;
7+
48
namespace SourceGit
59
{
6-
[JsonSourceGenerationOptions(WriteIndented = true, IgnoreReadOnlyFields = true, IgnoreReadOnlyProperties = true)]
7-
[JsonSerializable(typeof(List<Models.InteractiveRebaseJob>))]
10+
public class ColorConverter : JsonConverter<Color>
11+
{
12+
public override Color Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
13+
{
14+
return Color.Parse(reader.GetString());
15+
}
16+
17+
public override void Write(Utf8JsonWriter writer, Color value, JsonSerializerOptions options)
18+
{
19+
writer.WriteStringValue(value.ToString());
20+
}
21+
}
22+
23+
public class FontFamilyConverter : JsonConverter<FontFamily>
24+
{
25+
public override FontFamily Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
26+
{
27+
var name = reader.GetString();
28+
return new FontFamily(name);
29+
}
30+
31+
public override void Write(Utf8JsonWriter writer, FontFamily value, JsonSerializerOptions options)
32+
{
33+
writer.WriteStringValue(value.ToString());
34+
}
35+
}
36+
37+
public class GridLengthConverter : JsonConverter<GridLength>
38+
{
39+
public override GridLength Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
40+
{
41+
var size = reader.GetDouble();
42+
return new GridLength(size, GridUnitType.Pixel);
43+
}
44+
45+
public override void Write(Utf8JsonWriter writer, GridLength value, JsonSerializerOptions options)
46+
{
47+
writer.WriteNumberValue(value.Value);
48+
}
49+
}
50+
51+
[JsonSourceGenerationOptions(
52+
WriteIndented = true,
53+
IgnoreReadOnlyFields = true,
54+
IgnoreReadOnlyProperties = true,
55+
Converters = [
56+
typeof(ColorConverter),
57+
typeof(FontFamilyConverter),
58+
typeof(GridLengthConverter),
59+
]
60+
)]
61+
[JsonSerializable(typeof(Models.InteractiveRebaseJobCollection))]
862
[JsonSerializable(typeof(Models.JetBrainsState))]
63+
[JsonSerializable(typeof(Models.ThemeOverrides))]
964
[JsonSerializable(typeof(Models.Version))]
10-
[JsonSerializable(typeof(Models.CustomColorSchema))]
1165
[JsonSerializable(typeof(ViewModels.Preference))]
1266
[JsonSerializable(typeof(ViewModels.RepositorySettings))]
1367
internal partial class JsonCodeGen : JsonSerializerContext { }

src/App.axaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
<Application.Styles>
2121
<FluentTheme />
2222
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>
23-
<StyleInclude Source="avares://Avalonia.Controls.TreeDataGrid/Themes/Fluent.axaml"/>
2423
<StyleInclude Source="avares://AvaloniaEdit/Themes/Fluent/AvaloniaEdit.xaml" />
2524
<StyleInclude Source="/Resources/Styles.axaml"/>
2625
</Application.Styles>

0 commit comments

Comments
 (0)