mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07:00
code_style: run dotnet format
This commit is contained in:
parent
acf71a30b8
commit
85b83990a8
7 changed files with 18 additions and 17 deletions
|
@ -18,7 +18,7 @@ namespace SourceGit.Converters
|
||||||
{
|
{
|
||||||
if (OperatingSystem.IsWindows())
|
if (OperatingSystem.IsWindows())
|
||||||
return v;
|
return v;
|
||||||
|
|
||||||
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
var home = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
|
||||||
var prefixLen = home.EndsWith('/') ? home.Length - 1 : home.Length;
|
var prefixLen = home.EndsWith('/') ? home.Length - 1 : home.Length;
|
||||||
if (v.StartsWith(home, StringComparison.Ordinal))
|
if (v.StartsWith(home, StringComparison.Ordinal))
|
||||||
|
|
|
@ -43,12 +43,13 @@ namespace SourceGit.Models
|
||||||
{
|
{
|
||||||
_mode = mode;
|
_mode = mode;
|
||||||
|
|
||||||
YAxes = [new Axis() {
|
YAxes = [new Axis()
|
||||||
|
{
|
||||||
TextSize = 10,
|
TextSize = 10,
|
||||||
MinLimit = 0,
|
MinLimit = 0,
|
||||||
SeparatorsPaint = new SolidColorPaint(new SKColor(0x40808080)) { StrokeThickness = 1 }
|
SeparatorsPaint = new SolidColorPaint(new SKColor(0x40808080)) { StrokeThickness = 1 }
|
||||||
}];
|
}];
|
||||||
|
|
||||||
if (mode == StaticsticsMode.ThisWeek)
|
if (mode == StaticsticsMode.ThisWeek)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 7; i++)
|
for (int i = 0; i < 7; i++)
|
||||||
|
|
|
@ -38,7 +38,7 @@ namespace SourceGit.Models
|
||||||
extension = ".sh";
|
extension = ".sh";
|
||||||
else if (extension == ".kt" || extension == ".kts")
|
else if (extension == ".kt" || extension == ".kts")
|
||||||
extension = ".kotlin";
|
extension = ".kotlin";
|
||||||
|
|
||||||
foreach (var grammar in s_extraGrammars)
|
foreach (var grammar in s_extraGrammars)
|
||||||
{
|
{
|
||||||
if (grammar.Extension.Equals(extension, StringComparison.OrdinalIgnoreCase))
|
if (grammar.Extension.Equals(extension, StringComparison.OrdinalIgnoreCase))
|
||||||
|
@ -87,7 +87,7 @@ namespace SourceGit.Models
|
||||||
public ICollection<string> GetInjections(string scopeName) => _backend.GetInjections(scopeName);
|
public ICollection<string> GetInjections(string scopeName) => _backend.GetInjections(scopeName);
|
||||||
public IRawGrammar GetGrammar(string scopeName) => GrammarUtility.GetGrammar(scopeName, _backend);
|
public IRawGrammar GetGrammar(string scopeName) => GrammarUtility.GetGrammar(scopeName, _backend);
|
||||||
public string GetScope(string filename) => GrammarUtility.GetScope(filename, _backend);
|
public string GetScope(string filename) => GrammarUtility.GetScope(filename, _backend);
|
||||||
|
|
||||||
private readonly RegistryOptions _backend = new(defaultTheme);
|
private readonly RegistryOptions _backend = new(defaultTheme);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,8 +95,8 @@ namespace SourceGit.Models
|
||||||
{
|
{
|
||||||
public static TextMate.Installation CreateForEditor(TextEditor editor)
|
public static TextMate.Installation CreateForEditor(TextEditor editor)
|
||||||
{
|
{
|
||||||
return editor.InstallTextMate(Application.Current?.ActualThemeVariant == ThemeVariant.Dark ?
|
return editor.InstallTextMate(Application.Current?.ActualThemeVariant == ThemeVariant.Dark ?
|
||||||
new RegistryOptionsWrapper(ThemeName.DarkPlus) :
|
new RegistryOptionsWrapper(ThemeName.DarkPlus) :
|
||||||
new RegistryOptionsWrapper(ThemeName.LightPlus));
|
new RegistryOptionsWrapper(ThemeName.LightPlus));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
PopupHost.Active = value;
|
PopupHost.Active = value;
|
||||||
|
|
||||||
if (!_ignoreIndexChange && value is { Data: Repository repo})
|
if (!_ignoreIndexChange && value is { Data: Repository repo })
|
||||||
ActiveWorkspace.ActiveIdx = ActiveWorkspace.Repositories.IndexOf(repo.FullPath);
|
ActiveWorkspace.ActiveIdx = ActiveWorkspace.Repositories.IndexOf(repo.FullPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ namespace SourceGit.Views
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!e.Handled && e.Key != Key.Space)
|
if (!e.Handled && e.Key != Key.Space)
|
||||||
base.OnKeyDown(e);
|
base.OnKeyDown(e);
|
||||||
}
|
}
|
||||||
|
@ -166,10 +166,10 @@ namespace SourceGit.Views
|
||||||
{
|
{
|
||||||
if (lastUnselected == -1)
|
if (lastUnselected == -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastUnselected = i;
|
lastUnselected = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,10 +186,10 @@ namespace SourceGit.Views
|
||||||
{
|
{
|
||||||
if (lastUnselected == -1)
|
if (lastUnselected == -1)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastUnselected = i;
|
lastUnselected = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ namespace SourceGit.Views
|
||||||
_disableSelectionChangingEvent = true;
|
_disableSelectionChangingEvent = true;
|
||||||
|
|
||||||
var selected = new List<Models.Change>();
|
var selected = new List<Models.Change>();
|
||||||
if (sender is ListBox { SelectedItems: {} selectedItems })
|
if (sender is ListBox { SelectedItems: { } selectedItems })
|
||||||
{
|
{
|
||||||
foreach (var item in selectedItems)
|
foreach (var item in selectedItems)
|
||||||
{
|
{
|
||||||
|
|
|
@ -117,7 +117,7 @@ namespace SourceGit.Views
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!e.Handled)
|
if (!e.Handled)
|
||||||
base.OnKeyDown(e);
|
base.OnKeyDown(e);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ namespace SourceGit.Views
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class RepositoryListBox : ListBox
|
public class RepositoryListBox : ListBox
|
||||||
{
|
{
|
||||||
protected override Type StyleKeyOverride => typeof(ListBox);
|
protected override Type StyleKeyOverride => typeof(ListBox);
|
||||||
|
@ -40,7 +40,7 @@ namespace SourceGit.Views
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!e.Handled)
|
if (!e.Handled)
|
||||||
base.OnKeyDown(e);
|
base.OnKeyDown(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue