Compare commits

...

7 commits

Author SHA1 Message Date
github-actions[bot]
9d054a3dbf doc: Update translation status and missing keys
Some checks are pending
Continuous Integration / Build (push) Waiting to run
Continuous Integration / Prepare version string (push) Waiting to run
Continuous Integration / Package (push) Blocked by required conditions
Localization Check / localization-check (push) Waiting to run
2024-11-07 09:52:43 +00:00
leo
ef84891df1
feature: add new Editor Font Size configuration for all text editors (#661)
Signed-off-by: leo <longshuang@msn.cn>
2024-11-07 17:52:23 +08:00
leo
ffeb63613c
fix: ignoring new files under folder creates invalid .gitignore entries (#663)
Signed-off-by: leo <longshuang@msn.cn>
2024-11-07 17:18:04 +08:00
leo
243ce8b06d
project: use default optimization settings
Signed-off-by: leo <longshuang@msn.cn>
2024-11-07 11:31:51 +08:00
github-actions[bot]
4675b6edb8 doc: Update translation status and missing keys 2024-11-07 03:11:52 +00:00
leo
a919da6b4a
code_style: remove unused code and resources
Signed-off-by: leo <longshuang@msn.cn>
2024-11-07 11:11:35 +08:00
leo
45f4a5a4b1
ux: layout of floating panels (commands and notifications) (#659)
Signed-off-by: leo <longshuang@msn.cn>
2024-11-07 11:07:47 +08:00
20 changed files with 140 additions and 120 deletions

View file

@ -47,7 +47,7 @@
## Translation Status ## Translation Status
[![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-94.94%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-99.28%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-86.71%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-89.74%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-98.84%25-yellow)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md) [![en_US](https://img.shields.io/badge/en__US-100%25-brightgreen)](TRANSLATION.md) [![de__DE](https://img.shields.io/badge/de__DE-94.80%25-yellow)](TRANSLATION.md) [![es__ES](https://img.shields.io/badge/es__ES-99.13%25-yellow)](TRANSLATION.md) [![fr__FR](https://img.shields.io/badge/fr__FR-86.56%25-yellow)](TRANSLATION.md) [![pt__BR](https://img.shields.io/badge/pt__BR-89.60%25-yellow)](TRANSLATION.md) [![ru__RU](https://img.shields.io/badge/ru__RU-98.70%25-yellow)](TRANSLATION.md) [![zh__CN](https://img.shields.io/badge/zh__CN-100.00%25-brightgreen)](TRANSLATION.md) [![zh__TW](https://img.shields.io/badge/zh__TW-100.00%25-brightgreen)](TRANSLATION.md)
## How to Use ## How to Use

View file

@ -1,4 +1,4 @@
### de_DE.axaml: 94.94% ### de_DE.axaml: 94.80%
<details> <details>
@ -35,6 +35,7 @@
- Text.Preference.AI.AnalyzeDiffPrompt - Text.Preference.AI.AnalyzeDiffPrompt
- Text.Preference.AI.GenerateSubjectPrompt - Text.Preference.AI.GenerateSubjectPrompt
- Text.Preference.AI.Name - Text.Preference.AI.Name
- Text.Preference.Appearance.EditorFontSize
- Text.Repository.CustomActions - Text.Repository.CustomActions
- Text.Repository.CustomActions.Empty - Text.Repository.CustomActions.Empty
- Text.Stash.KeepIndex - Text.Stash.KeepIndex
@ -42,7 +43,7 @@
</details> </details>
### es_ES.axaml: 99.28% ### es_ES.axaml: 99.13%
<details> <details>
@ -53,10 +54,11 @@
- Text.Hotkeys.Repo.Fetch - Text.Hotkeys.Repo.Fetch
- Text.Hotkeys.Repo.Pull - Text.Hotkeys.Repo.Pull
- Text.Hotkeys.Repo.Push - Text.Hotkeys.Repo.Push
- Text.Preference.Appearance.EditorFontSize
</details> </details>
### fr_FR.axaml: 86.71% ### fr_FR.axaml: 86.56%
<details> <details>
@ -129,6 +131,7 @@
- Text.Preference.AI.Model - Text.Preference.AI.Model
- Text.Preference.AI.Name - Text.Preference.AI.Name
- Text.Preference.AI.Server - Text.Preference.AI.Server
- Text.Preference.Appearance.EditorFontSize
- Text.Preference.General.ShowAuthorTime - Text.Preference.General.ShowAuthorTime
- Text.Preference.Integration - Text.Preference.Integration
- Text.Preference.Shell - Text.Preference.Shell
@ -157,7 +160,7 @@
</details> </details>
### pt_BR.axaml: 89.74% ### pt_BR.axaml: 89.60%
<details> <details>
@ -221,6 +224,7 @@
- Text.MoveRepositoryNode - Text.MoveRepositoryNode
- Text.MoveRepositoryNode.Target - Text.MoveRepositoryNode.Target
- Text.Preference.AI.Name - Text.Preference.AI.Name
- Text.Preference.Appearance.EditorFontSize
- Text.Push.CheckSubmodules - Text.Push.CheckSubmodules
- Text.Repository.CustomActions - Text.Repository.CustomActions
- Text.Repository.CustomActions.Empty - Text.Repository.CustomActions.Empty
@ -237,7 +241,7 @@
</details> </details>
### ru_RU.axaml: 98.84% ### ru_RU.axaml: 98.70%
<details> <details>
@ -251,6 +255,7 @@
- Text.Hotkeys.Repo.Push - Text.Hotkeys.Repo.Push
- Text.IssueLinkCM.OpenInBrowser - Text.IssueLinkCM.OpenInBrowser
- Text.IssueLinkCM.CopyLink - Text.IssueLinkCM.CopyLink
- Text.Preference.Appearance.EditorFontSize
</details> </details>

View file

@ -4,10 +4,5 @@
{ {
public bool IsError { get; set; } = false; public bool IsError { get; set; } = false;
public string Message { get; set; } = string.Empty; public string Message { get; set; } = string.Empty;
public void CopyMessage()
{
App.CopyText(Message);
}
} }
} }

View file

@ -170,7 +170,6 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Art der Änderung:</x:String> <x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Art der Änderung:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">Kopieren</x:String> <x:String x:Key="Text.Copy" xml:space="preserve">Kopieren</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">Kopiere gesamten Text</x:String> <x:String x:Key="Text.CopyAllText" xml:space="preserve">Kopiere gesamten Text</x:String>
<x:String x:Key="Text.CopyMessage" xml:space="preserve">COMMIT-NACHRICHT KOPIEREN</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Pfad kopieren</x:String> <x:String x:Key="Text.CopyPath" xml:space="preserve">Pfad kopieren</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Dateinamen kopieren</x:String> <x:String x:Key="Text.CopyFileName" xml:space="preserve">Dateinamen kopieren</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Branch erstellen...</x:String> <x:String x:Key="Text.CreateBranch" xml:space="preserve">Branch erstellen...</x:String>

View file

@ -185,7 +185,6 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Type of Change:</x:String> <x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Type of Change:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">Copy</x:String> <x:String x:Key="Text.Copy" xml:space="preserve">Copy</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">Copy All Text</x:String> <x:String x:Key="Text.CopyAllText" xml:space="preserve">Copy All Text</x:String>
<x:String x:Key="Text.CopyMessage" xml:space="preserve">COPY MESSAGE</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Copy Path</x:String> <x:String x:Key="Text.CopyPath" xml:space="preserve">Copy Path</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Copy File Name</x:String> <x:String x:Key="Text.CopyFileName" xml:space="preserve">Copy File Name</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Create Branch...</x:String> <x:String x:Key="Text.CreateBranch" xml:space="preserve">Create Branch...</x:String>
@ -436,6 +435,7 @@
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">APPEARANCE</x:String> <x:String x:Key="Text.Preference.Appearance" xml:space="preserve">APPEARANCE</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Default Font</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">Default Font</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Default Font Size</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">Default Font Size</x:String>
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">Editor Font Size</x:String>
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Monospace Font</x:String> <x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">Monospace Font</x:String>
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Only use monospace font in text editor</x:String> <x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">Only use monospace font in text editor</x:String>
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Theme</x:String> <x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">Theme</x:String>

View file

@ -190,7 +190,6 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Tipo de Cambio:</x:String> <x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Tipo de Cambio:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">Copiar</x:String> <x:String x:Key="Text.Copy" xml:space="preserve">Copiar</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">Copiar Todo el Texto</x:String> <x:String x:Key="Text.CopyAllText" xml:space="preserve">Copiar Todo el Texto</x:String>
<x:String x:Key="Text.CopyMessage" xml:space="preserve">COPIAR MENSAJE</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Copiar Ruta</x:String> <x:String x:Key="Text.CopyPath" xml:space="preserve">Copiar Ruta</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Copiar Nombre del Archivo</x:String> <x:String x:Key="Text.CopyFileName" xml:space="preserve">Copiar Nombre del Archivo</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Crear Rama...</x:String> <x:String x:Key="Text.CreateBranch" xml:space="preserve">Crear Rama...</x:String>

View file

@ -152,7 +152,6 @@
<x:String x:Key="Text.Copy" xml:space="preserve">Copier</x:String> <x:String x:Key="Text.Copy" xml:space="preserve">Copier</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">Copier tout le texte</x:String> <x:String x:Key="Text.CopyAllText" xml:space="preserve">Copier tout le texte</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Copier le nom de fichier</x:String> <x:String x:Key="Text.CopyFileName" xml:space="preserve">Copier le nom de fichier</x:String>
<x:String x:Key="Text.CopyMessage" xml:space="preserve">COPIER LE MESSAGE</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Copier le chemin</x:String> <x:String x:Key="Text.CopyPath" xml:space="preserve">Copier le chemin</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Créer une branche...</x:String> <x:String x:Key="Text.CreateBranch" xml:space="preserve">Créer une branche...</x:String>
<x:String x:Key="Text.CreateBranch.BasedOn" xml:space="preserve">Basé sur :</x:String> <x:String x:Key="Text.CreateBranch.BasedOn" xml:space="preserve">Basé sur :</x:String>

View file

@ -148,7 +148,6 @@
<x:String x:Key="Text.Configure" xml:space="preserve">Configurar Repositório</x:String> <x:String x:Key="Text.Configure" xml:space="preserve">Configurar Repositório</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">Copiar</x:String> <x:String x:Key="Text.Copy" xml:space="preserve">Copiar</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Copiar Nome do Arquivo</x:String> <x:String x:Key="Text.CopyFileName" xml:space="preserve">Copiar Nome do Arquivo</x:String>
<x:String x:Key="Text.CopyMessage" xml:space="preserve">COPIAR MENSAGEM</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Copiar Caminho</x:String> <x:String x:Key="Text.CopyPath" xml:space="preserve">Copiar Caminho</x:String>
<x:String x:Key="Text.CreateBranch.BasedOn" xml:space="preserve">Baseado Em:</x:String> <x:String x:Key="Text.CreateBranch.BasedOn" xml:space="preserve">Baseado Em:</x:String>
<x:String x:Key="Text.CreateBranch.Checkout" xml:space="preserve">Checar o branch criado</x:String> <x:String x:Key="Text.CreateBranch.Checkout" xml:space="preserve">Checar o branch criado</x:String>

View file

@ -189,7 +189,6 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Тип изменения:</x:String> <x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">Тип изменения:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">Копировать</x:String> <x:String x:Key="Text.Copy" xml:space="preserve">Копировать</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">Копировать весь текст</x:String> <x:String x:Key="Text.CopyAllText" xml:space="preserve">Копировать весь текст</x:String>
<x:String x:Key="Text.CopyMessage" xml:space="preserve">КОПИРОВАТЬ СООБЩЕНИЕ</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">Копировать путь</x:String> <x:String x:Key="Text.CopyPath" xml:space="preserve">Копировать путь</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">Копировать имя файла</x:String> <x:String x:Key="Text.CopyFileName" xml:space="preserve">Копировать имя файла</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Создать ветку...</x:String> <x:String x:Key="Text.CreateBranch" xml:space="preserve">Создать ветку...</x:String>

View file

@ -188,7 +188,6 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">类型:</x:String> <x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">类型:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">复制</x:String> <x:String x:Key="Text.Copy" xml:space="preserve">复制</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">复制全部文本</x:String> <x:String x:Key="Text.CopyAllText" xml:space="preserve">复制全部文本</x:String>
<x:String x:Key="Text.CopyMessage" xml:space="preserve">复制内容</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">复制路径</x:String> <x:String x:Key="Text.CopyPath" xml:space="preserve">复制路径</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">复制文件名</x:String> <x:String x:Key="Text.CopyFileName" xml:space="preserve">复制文件名</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">新建分支 ...</x:String> <x:String x:Key="Text.CreateBranch" xml:space="preserve">新建分支 ...</x:String>
@ -439,6 +438,7 @@
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">外观配置</x:String> <x:String x:Key="Text.Preference.Appearance" xml:space="preserve">外观配置</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">缺省字体</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">缺省字体</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">默认字体大小</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">默认字体大小</x:String>
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">代码字体大小</x:String>
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">等宽字体</x:String> <x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">等宽字体</x:String>
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">仅在文本编辑器中使用等宽字体</x:String> <x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">仅在文本编辑器中使用等宽字体</x:String>
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">主题</x:String> <x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">主题</x:String>

View file

@ -188,7 +188,6 @@
<x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">類型:</x:String> <x:String x:Key="Text.ConventionalCommit.Type" xml:space="preserve">類型:</x:String>
<x:String x:Key="Text.Copy" xml:space="preserve">複製</x:String> <x:String x:Key="Text.Copy" xml:space="preserve">複製</x:String>
<x:String x:Key="Text.CopyAllText" xml:space="preserve">複製全部內容</x:String> <x:String x:Key="Text.CopyAllText" xml:space="preserve">複製全部內容</x:String>
<x:String x:Key="Text.CopyMessage" xml:space="preserve">複製內容</x:String>
<x:String x:Key="Text.CopyPath" xml:space="preserve">複製路徑</x:String> <x:String x:Key="Text.CopyPath" xml:space="preserve">複製路徑</x:String>
<x:String x:Key="Text.CopyFileName" xml:space="preserve">複製檔案名稱</x:String> <x:String x:Key="Text.CopyFileName" xml:space="preserve">複製檔案名稱</x:String>
<x:String x:Key="Text.CreateBranch" xml:space="preserve">新增分支...</x:String> <x:String x:Key="Text.CreateBranch" xml:space="preserve">新增分支...</x:String>
@ -439,6 +438,7 @@
<x:String x:Key="Text.Preference.Appearance" xml:space="preserve">外觀設定</x:String> <x:String x:Key="Text.Preference.Appearance" xml:space="preserve">外觀設定</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">預設字型</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFont" xml:space="preserve">預設字型</x:String>
<x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">預設字型大小</x:String> <x:String x:Key="Text.Preference.Appearance.DefaultFontSize" xml:space="preserve">預設字型大小</x:String>
<x:String x:Key="Text.Preference.Appearance.EditorFontSize" xml:space="preserve">程式碼字型大小</x:String>
<x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">等寬字型</x:String> <x:String x:Key="Text.Preference.Appearance.MonospaceFont" xml:space="preserve">等寬字型</x:String>
<x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">僅在文字編輯器中使用等寬字型</x:String> <x:String x:Key="Text.Preference.Appearance.OnlyUseMonoFontInEditor" xml:space="preserve">僅在文字編輯器中使用等寬字型</x:String>
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">佈景主題</x:String> <x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">佈景主題</x:String>

View file

@ -24,7 +24,6 @@
<PublishAot>true</PublishAot> <PublishAot>true</PublishAot>
<PublishTrimmed>true</PublishTrimmed> <PublishTrimmed>true</PublishTrimmed>
<TrimMode>link</TrimMode> <TrimMode>link</TrimMode>
<OptimizationPreference>Speed</OptimizationPreference>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View file

@ -102,6 +102,12 @@ namespace SourceGit.ViewModels
set => SetProperty(ref _defaultFontSize, value); set => SetProperty(ref _defaultFontSize, value);
} }
public double EditorFontSize
{
get => _editorFontSize;
set => SetProperty(ref _editorFontSize, value);
}
public LayoutInfo Layout public LayoutInfo Layout
{ {
get => _layout; get => _layout;
@ -579,6 +585,7 @@ namespace SourceGit.ViewModels
private bool _onlyUseMonoFontInEditor = false; private bool _onlyUseMonoFontInEditor = false;
private bool _useSystemWindowFrame = false; private bool _useSystemWindowFrame = false;
private double _defaultFontSize = 13; private double _defaultFontSize = 13;
private double _editorFontSize = 13;
private LayoutInfo _layout = new LayoutInfo(); private LayoutInfo _layout = new LayoutInfo();
private int _maxHistoryCommits = 20000; private int _maxHistoryCommits = 20000;

View file

@ -599,7 +599,8 @@ namespace SourceGit.ViewModels
byParentFolder.IsVisible = !isRooted; byParentFolder.IsVisible = !isRooted;
byParentFolder.Click += (_, e) => byParentFolder.Click += (_, e) =>
{ {
Commands.GitIgnore.Add(_repo.FullPath, Path.GetDirectoryName(change.Path) + "/"); var path = Path.GetDirectoryName(change.Path).Replace("\\", "/");
Commands.GitIgnore.Add(_repo.FullPath, path + "/");
e.Handled = true; e.Handled = true;
}; };
addToIgnore.Items.Add(byParentFolder); addToIgnore.Items.Add(byParentFolder);
@ -620,7 +621,8 @@ namespace SourceGit.ViewModels
byExtensionInSameFolder.IsVisible = !isRooted; byExtensionInSameFolder.IsVisible = !isRooted;
byExtensionInSameFolder.Click += (_, e) => byExtensionInSameFolder.Click += (_, e) =>
{ {
Commands.GitIgnore.Add(_repo.FullPath, Path.GetDirectoryName(change.Path) + "/*" + extension); var path = Path.GetDirectoryName(change.Path).Replace("\\", "/");
Commands.GitIgnore.Add(_repo.FullPath, path + "/*" + extension);
e.Handled = true; e.Handled = true;
}; };
addToIgnore.Items.Add(byExtensionInSameFolder); addToIgnore.Items.Add(byExtensionInSameFolder);

View file

@ -57,6 +57,7 @@
Background="Transparent" Background="Transparent"
Foreground="{DynamicResource Brush.FG1}" Foreground="{DynamicResource Brush.FG1}"
FontFamily="{DynamicResource Fonts.Monospace}" FontFamily="{DynamicResource Fonts.Monospace}"
FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=EditorFontSize}"
BlameData="{Binding Data}"/> BlameData="{Binding Data}"/>
<!-- Not supported mask (for binary files) --> <!-- Not supported mask (for binary files) -->

View file

@ -5,6 +5,7 @@
xmlns:m="using:SourceGit.Models" xmlns:m="using:SourceGit.Models"
xmlns:v="using:SourceGit.Views" xmlns:v="using:SourceGit.Views"
xmlns:vm="using:SourceGit.ViewModels" xmlns:vm="using:SourceGit.ViewModels"
xmlns:c="using:SourceGit.Converters"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SourceGit.Views.LauncherPage" x:Class="SourceGit.Views.LauncherPage"
x:DataType="vm:LauncherPage"> x:DataType="vm:LauncherPage">
@ -38,103 +39,100 @@
</ContentControl.DataTemplates> </ContentControl.DataTemplates>
</ContentControl> </ContentControl>
</Border> </Border>
<!-- Popup -->
<Grid Grid.Row="1" IsVisible="{Binding Popup, Converter={x:Static ObjectConverters.IsNotNull}}" ClipToBounds="True">
<Border Background="Transparent" PointerPressed="OnPopupCancelByClickMask"/>
<Border Width="500" HorizontalAlignment="Center" VerticalAlignment="Top" Effect="drop-shadow(0 0 8 #8F000000)" CornerRadius="0,0,8,8" ClipToBounds="True"> <!-- Floating -->
<ContentControl Content="{Binding Popup}" Background="{DynamicResource Brush.Popup}"> <Grid Grid.Row="1" ClipToBounds="True">
<ContentControl.DataTemplates> <Grid.IsVisible>
<DataTemplate DataType="vm:Popup"> <MultiBinding Converter="{x:Static BoolConverters.Or}">
<StackPanel Orientation="Vertical" Background="{DynamicResource Brush.Popup}"> <Binding Path="Popup" Converter="{x:Static ObjectConverters.IsNotNull}"/>
<!-- Popup Widget --> <Binding Path="Notifications.Count" Converter="{x:Static c:IntConverters.IsGreaterThanZero}"/>
<ContentPresenter Margin="8,16,8,8" </MultiBinding>
Content="{Binding View}" </Grid.IsVisible>
IsHitTestVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}"/>
<!-- Options --> <Border Background="Transparent"
<StackPanel Margin="8,4,8,8" PointerPressed="OnMaskClicked"
Height="32" IsVisible="{Binding Popup, Converter={x:Static ObjectConverters.IsNotNull}}"/>
Orientation="Horizontal"
HorizontalAlignment="Right" <Grid RowDefinitions="Auto,*" Width="512" HorizontalAlignment="Center">
IsVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}"> <!-- Popup -->
<Button Classes="flat primary" <Border Grid.Row="0"
Width="80" Height="28" Margin="6,0"
Padding="0" Effect="drop-shadow(0 0 8 #8F000000)"
HorizontalContentAlignment="Center" CornerRadius="0,0,8,8"
VerticalContentAlignment="Center" ClipToBounds="True"
Content="{DynamicResource Text.Sure}" IsVisible="{Binding Popup, Converter={x:Static ObjectConverters.IsNotNull}}">
Click="OnPopupSure" <ContentControl Content="{Binding Popup}" Background="{DynamicResource Brush.Popup}">
HotKey="Enter"/> <ContentControl.DataTemplates>
<Button Classes="flat" <DataTemplate DataType="vm:Popup">
Width="80" Height="28" <StackPanel Orientation="Vertical" Background="{DynamicResource Brush.Popup}">
Margin="8,0,0,0" <!-- Popup Widget -->
Padding="0" <ContentPresenter Margin="8,16,8,8"
HorizontalContentAlignment="Center" Content="{Binding View}"
VerticalContentAlignment="Center" IsHitTestVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}"/>
Content="{DynamicResource Text.Cancel}"
Click="OnPopupCancel"/> <!-- Options -->
<StackPanel Margin="8,4,8,8"
Height="32"
Orientation="Horizontal"
HorizontalAlignment="Right"
IsVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}">
<Button Classes="flat primary"
Width="80" Height="28"
Padding="0"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Content="{DynamicResource Text.Sure}"
Click="OnPopupSure"
HotKey="Enter"/>
<Button Classes="flat"
Width="80" Height="28"
Margin="8,0,0,0"
Padding="0"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
Content="{DynamicResource Text.Cancel}"
Click="OnPopupCancel"/>
</StackPanel>
<!-- Running -->
<v:PopupRunningStatus Margin="12,8"
Description="{Binding ProgressDescription}"
IsVisible="{Binding InProgress}"/>
</StackPanel> </StackPanel>
</DataTemplate>
</ContentControl.DataTemplates>
</ContentControl>
</Border>
<!-- Running --> <!-- Notifications -->
<v:PopupRunningStatus Margin="12,8" <ScrollViewer Grid.Row="1" Margin="0,6,0,0" VerticalAlignment="Top" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
Description="{Binding ProgressDescription}" <ItemsControl ItemsSource="{Binding Notifications}">
IsVisible="{Binding InProgress}"/> <ItemsControl.ItemTemplate>
</StackPanel> <DataTemplate DataType="m:Notification">
</DataTemplate> <Border Margin="6" HorizontalAlignment="Stretch" VerticalAlignment="Top" Effect="drop-shadow(0 0 12 #A0000000)">
</ContentControl.DataTemplates> <Border Padding="8" CornerRadius="6" Background="{DynamicResource Brush.Popup}">
</ContentControl> <Grid RowDefinitions="26,Auto">
</Border> <Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Margin="8,0">
</Grid> <Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Error}" Fill="Red" IsVisible="{Binding IsError}"/>
<Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Info}" Fill="Green" IsVisible="{Binding !IsError}"/>
<!-- Notification --> <TextBlock Grid.Column="1" Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Error}" IsVisible="{Binding IsError}"/>
<Grid Grid.Row="1" Width="480" HorizontalAlignment="Right" VerticalAlignment="Top"> <TextBlock Grid.Column="1" Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Info}" IsVisible="{Binding !IsError}"/>
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"> <Button Grid.Column="2" Classes="icon_button" Width="16" Height="16" Click="OnDismissNotification">
<ItemsControl ItemsSource="{Binding Notifications}"> <Path Width="10" Height="10" Data="{StaticResource Icons.Window.Close}"/>
<ItemsControl.ItemTemplate> </Button>
<DataTemplate DataType="m:Notification"> </Grid>
<Border Margin="10,6" HorizontalAlignment="Stretch" VerticalAlignment="Top" Effect="drop-shadow(0 0 12 #A0000000)">
<Border Padding="8" CornerRadius="6" Background="{DynamicResource Brush.Popup}">
<Grid RowDefinitions="26,Auto,32">
<StackPanel Grid.Row="0" Margin="8,0,0,0" Orientation="Horizontal" IsVisible="{Binding IsError}">
<Path Width="14" Height="14" Data="{StaticResource Icons.Error}" Fill="Red"/>
<TextBlock Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Error}"/>
</StackPanel>
<StackPanel Grid.Row="0" Margin="8,0,0,0" Orientation="Horizontal" IsVisible="{Binding !IsError}">
<Path Width="14" Height="14" Data="{StaticResource Icons.Info}" Fill="Green"/>
<TextBlock Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Info}"/>
</StackPanel>
<TextBox Grid.Row="1" <ScrollViewer Grid.Row="1" Margin="8" MaxHeight="100" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
Classes="no_background no_border" <SelectableTextBlock TextWrapping="Wrap" Text="{Binding Message}"/>
IsReadOnly="True" </ScrollViewer>
TextWrapping="Wrap" </Grid>
ScrollViewer.VerticalScrollBarVisibility="Auto" </Border>
MaxHeight="100"
Margin="8" Padding="0"
VerticalContentAlignment="Top"
Text="{Binding Message}"/>
<StackPanel Grid.Row="2" Margin="0,4,0,0" Orientation="Horizontal" HorizontalAlignment="Right">
<Button Classes="flat"
Margin="0,0,8,0"
Command="{Binding CopyMessage}"
Content="{DynamicResource Text.CopyMessage}"
IsVisible="{Binding IsError}"/>
<Button Classes="flat primary"
Margin="0,0"
Content="{DynamicResource Text.Close}"
Click="OnDismissNotification"/>
</StackPanel>
</Grid>
</Border> </Border>
</Border> </DataTemplate>
</DataTemplate> </ItemsControl.ItemTemplate>
</ItemsControl.ItemTemplate> </ItemsControl>
</ItemsControl> </ScrollViewer>
</ScrollViewer> </Grid>
</Grid> </Grid>
</Grid> </Grid>
</UserControl> </UserControl>

View file

@ -27,7 +27,7 @@ namespace SourceGit.Views
e.Handled = true; e.Handled = true;
} }
private void OnPopupCancelByClickMask(object sender, PointerPressedEventArgs e) private void OnMaskClicked(object sender, PointerPressedEventArgs e)
{ {
OnPopupCancel(sender, e); OnPopupCancel(sender, e);
} }

View file

@ -121,7 +121,7 @@
<TabItem.Header> <TabItem.Header>
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Appearance}"/> <TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Appearance}"/>
</TabItem.Header> </TabItem.Header>
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*"> <Grid Margin="8" RowDefinitions="32,32,32,32,32,32,32,32,Auto" ColumnDefinitions="Auto,*">
<TextBlock Grid.Row="0" Grid.Column="0" <TextBlock Grid.Row="0" Grid.Column="0"
Text="{DynamicResource Text.Preference.Appearance.Theme}" Text="{DynamicResource Text.Preference.Appearance.Theme}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
@ -170,10 +170,22 @@
Value="{Binding DefaultFontSize, Mode=TwoWay}"/> Value="{Binding DefaultFontSize, Mode=TwoWay}"/>
<TextBlock Grid.Row="4" Grid.Column="0" <TextBlock Grid.Row="4" Grid.Column="0"
Text="{DynamicResource Text.Preference.Appearance.EditorFontSize}"
HorizontalAlignment="Right"
Margin="0,0,16,0"/>
<NumericUpDown Grid.Row="4" Grid.Column="1"
Minimum="10" Maximum="18" Increment="0.5"
Height="28"
Padding="4"
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border1}"
CornerRadius="3"
Value="{Binding EditorFontSize, Mode=TwoWay}"/>
<TextBlock Grid.Row="5" Grid.Column="0"
Text="{DynamicResource Text.Preference.Appearance.ThemeOverrides}" Text="{DynamicResource Text.Preference.Appearance.ThemeOverrides}"
HorizontalAlignment="Right" HorizontalAlignment="Right"
Margin="0,0,16,0"/> Margin="0,0,16,0"/>
<TextBox Grid.Row="4" Grid.Column="1" <TextBox Grid.Row="5" Grid.Column="1"
Height="28" Height="28"
CornerRadius="3" CornerRadius="3"
Text="{Binding ThemeOverrides, Mode=TwoWay}"> Text="{Binding ThemeOverrides, Mode=TwoWay}">
@ -184,16 +196,16 @@
</TextBox.InnerRightContent> </TextBox.InnerRightContent>
</TextBox> </TextBox>
<CheckBox Grid.Row="5" Grid.Column="1" <CheckBox Grid.Row="6" Grid.Column="1"
Content="{DynamicResource Text.Preference.Appearance.OnlyUseMonoFontInEditor}" Content="{DynamicResource Text.Preference.Appearance.OnlyUseMonoFontInEditor}"
IsChecked="{Binding OnlyUseMonoFontInEditor, Mode=TwoWay}"/> IsChecked="{Binding OnlyUseMonoFontInEditor, Mode=TwoWay}"/>
<CheckBox Grid.Row="6" Grid.Column="1" <CheckBox Grid.Row="7" Grid.Column="1"
Height="32" Height="32"
Content="{DynamicResource Text.Preference.Appearance.UseFixedTabWidth}" Content="{DynamicResource Text.Preference.Appearance.UseFixedTabWidth}"
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseFixedTabWidth, Mode=TwoWay}"/> IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseFixedTabWidth, Mode=TwoWay}"/>
<CheckBox Grid.Row="7" Grid.Column="1" <CheckBox Grid.Row="8" Grid.Column="1"
Height="32" Height="32"
Content="{DynamicResource Text.Preference.Appearance.UseNativeWindowFrame}" Content="{DynamicResource Text.Preference.Appearance.UseNativeWindowFrame}"
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSystemWindowFrame, Mode=OneTime}" IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSystemWindowFrame, Mode=OneTime}"

View file

@ -4,6 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:m="using:SourceGit.Models" xmlns:m="using:SourceGit.Models"
xmlns:v="using:SourceGit.Views" xmlns:v="using:SourceGit.Views"
xmlns:vm="using:SourceGit.ViewModels"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SourceGit.Views.RevisionFileContentViewer"> x:Class="SourceGit.Views.RevisionFileContentViewer">
<UserControl.DataTemplates> <UserControl.DataTemplates>
@ -19,7 +20,9 @@
</DataTemplate> </DataTemplate>
<DataTemplate DataType="m:RevisionTextFile"> <DataTemplate DataType="m:RevisionTextFile">
<v:RevisionTextFileView FontFamily="{DynamicResource Fonts.Monospace}" Background="{DynamicResource Brush.Contents}"/> <v:RevisionTextFileView FontFamily="{DynamicResource Fonts.Monospace}"
FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=EditorFontSize}"
Background="{DynamicResource Brush.Contents}"/>
</DataTemplate> </DataTemplate>
<DataTemplate DataType="m:RevisionImageFile"> <DataTemplate DataType="m:RevisionImageFile">

View file

@ -23,6 +23,7 @@
DeletedHighlightBrush="{DynamicResource Brush.Diff.DeletedHighlight}" DeletedHighlightBrush="{DynamicResource Brush.Diff.DeletedHighlight}"
IndicatorForeground="{DynamicResource Brush.FG2}" IndicatorForeground="{DynamicResource Brush.FG2}"
FontFamily="{DynamicResource Fonts.Monospace}" FontFamily="{DynamicResource Fonts.Monospace}"
FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=EditorFontSize}"
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting}" UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting}"
WordWrap="{Binding Source={x:Static vm:Preference.Instance}, Path=EnableDiffViewWordWrap}" WordWrap="{Binding Source={x:Static vm:Preference.Instance}, Path=EnableDiffViewWordWrap}"
ShowHiddenSymbols="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView}" ShowHiddenSymbols="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView}"
@ -44,6 +45,7 @@
DeletedHighlightBrush="{DynamicResource Brush.Diff.DeletedHighlight}" DeletedHighlightBrush="{DynamicResource Brush.Diff.DeletedHighlight}"
IndicatorForeground="{DynamicResource Brush.FG2}" IndicatorForeground="{DynamicResource Brush.FG2}"
FontFamily="{DynamicResource Fonts.Monospace}" FontFamily="{DynamicResource Fonts.Monospace}"
FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=EditorFontSize}"
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting}" UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting}"
WordWrap="False" WordWrap="False"
ShowHiddenSymbols="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView}" ShowHiddenSymbols="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView}"
@ -64,6 +66,7 @@
DeletedHighlightBrush="{DynamicResource Brush.Diff.DeletedHighlight}" DeletedHighlightBrush="{DynamicResource Brush.Diff.DeletedHighlight}"
IndicatorForeground="{DynamicResource Brush.FG2}" IndicatorForeground="{DynamicResource Brush.FG2}"
FontFamily="{DynamicResource Fonts.Monospace}" FontFamily="{DynamicResource Fonts.Monospace}"
FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=EditorFontSize}"
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting}" UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting}"
WordWrap="False" WordWrap="False"
ShowHiddenSymbols="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView}" ShowHiddenSymbols="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView}"