mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-26 21:17:20 -08:00
Compare commits
7 commits
88cec05e67
...
9d054a3dbf
Author | SHA1 | Date | |
---|---|---|---|
|
9d054a3dbf | ||
|
ef84891df1 | ||
|
ffeb63613c | ||
|
243ce8b06d | ||
|
4675b6edb8 | ||
|
a919da6b4a | ||
|
45f4a5a4b1 |
20 changed files with 140 additions and 120 deletions
|
@ -47,7 +47,7 @@
|
|||
|
||||
## 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
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
### de_DE.axaml: 94.94%
|
||||
### de_DE.axaml: 94.80%
|
||||
|
||||
|
||||
<details>
|
||||
|
@ -35,6 +35,7 @@
|
|||
- Text.Preference.AI.AnalyzeDiffPrompt
|
||||
- Text.Preference.AI.GenerateSubjectPrompt
|
||||
- Text.Preference.AI.Name
|
||||
- Text.Preference.Appearance.EditorFontSize
|
||||
- Text.Repository.CustomActions
|
||||
- Text.Repository.CustomActions.Empty
|
||||
- Text.Stash.KeepIndex
|
||||
|
@ -42,7 +43,7 @@
|
|||
|
||||
</details>
|
||||
|
||||
### es_ES.axaml: 99.28%
|
||||
### es_ES.axaml: 99.13%
|
||||
|
||||
|
||||
<details>
|
||||
|
@ -53,10 +54,11 @@
|
|||
- Text.Hotkeys.Repo.Fetch
|
||||
- Text.Hotkeys.Repo.Pull
|
||||
- Text.Hotkeys.Repo.Push
|
||||
- Text.Preference.Appearance.EditorFontSize
|
||||
|
||||
</details>
|
||||
|
||||
### fr_FR.axaml: 86.71%
|
||||
### fr_FR.axaml: 86.56%
|
||||
|
||||
|
||||
<details>
|
||||
|
@ -129,6 +131,7 @@
|
|||
- Text.Preference.AI.Model
|
||||
- Text.Preference.AI.Name
|
||||
- Text.Preference.AI.Server
|
||||
- Text.Preference.Appearance.EditorFontSize
|
||||
- Text.Preference.General.ShowAuthorTime
|
||||
- Text.Preference.Integration
|
||||
- Text.Preference.Shell
|
||||
|
@ -157,7 +160,7 @@
|
|||
|
||||
</details>
|
||||
|
||||
### pt_BR.axaml: 89.74%
|
||||
### pt_BR.axaml: 89.60%
|
||||
|
||||
|
||||
<details>
|
||||
|
@ -221,6 +224,7 @@
|
|||
- Text.MoveRepositoryNode
|
||||
- Text.MoveRepositoryNode.Target
|
||||
- Text.Preference.AI.Name
|
||||
- Text.Preference.Appearance.EditorFontSize
|
||||
- Text.Push.CheckSubmodules
|
||||
- Text.Repository.CustomActions
|
||||
- Text.Repository.CustomActions.Empty
|
||||
|
@ -237,7 +241,7 @@
|
|||
|
||||
</details>
|
||||
|
||||
### ru_RU.axaml: 98.84%
|
||||
### ru_RU.axaml: 98.70%
|
||||
|
||||
|
||||
<details>
|
||||
|
@ -251,6 +255,7 @@
|
|||
- Text.Hotkeys.Repo.Push
|
||||
- Text.IssueLinkCM.OpenInBrowser
|
||||
- Text.IssueLinkCM.CopyLink
|
||||
- Text.Preference.Appearance.EditorFontSize
|
||||
|
||||
</details>
|
||||
|
||||
|
|
|
@ -4,10 +4,5 @@
|
|||
{
|
||||
public bool IsError { get; set; } = false;
|
||||
public string Message { get; set; } = string.Empty;
|
||||
|
||||
public void CopyMessage()
|
||||
{
|
||||
App.CopyText(Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -170,7 +170,6 @@
|
|||
<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.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.CopyFileName" xml:space="preserve">Dateinamen kopieren</x:String>
|
||||
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Branch erstellen...</x:String>
|
||||
|
|
|
@ -185,7 +185,6 @@
|
|||
<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.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.CopyFileName" xml:space="preserve">Copy File Name</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.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.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.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>
|
||||
|
|
|
@ -190,7 +190,6 @@
|
|||
<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.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.CopyFileName" xml:space="preserve">Copiar Nombre del Archivo</x:String>
|
||||
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Crear Rama...</x:String>
|
||||
|
|
|
@ -152,7 +152,6 @@
|
|||
<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.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.CreateBranch" xml:space="preserve">Créer une branche...</x:String>
|
||||
<x:String x:Key="Text.CreateBranch.BasedOn" xml:space="preserve">Basé sur :</x:String>
|
||||
|
|
|
@ -148,7 +148,6 @@
|
|||
<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.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.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>
|
||||
|
|
|
@ -189,7 +189,6 @@
|
|||
<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.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.CopyFileName" xml:space="preserve">Копировать имя файла</x:String>
|
||||
<x:String x:Key="Text.CreateBranch" xml:space="preserve">Создать ветку...</x:String>
|
||||
|
|
|
@ -188,7 +188,6 @@
|
|||
<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.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.CopyFileName" 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.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.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.OnlyUseMonoFontInEditor" xml:space="preserve">仅在文本编辑器中使用等宽字体</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">主题</x:String>
|
||||
|
|
|
@ -188,7 +188,6 @@
|
|||
<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.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.CopyFileName" 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.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.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.OnlyUseMonoFontInEditor" xml:space="preserve">僅在文字編輯器中使用等寬字型</x:String>
|
||||
<x:String x:Key="Text.Preference.Appearance.Theme" xml:space="preserve">佈景主題</x:String>
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
<PublishAot>true</PublishAot>
|
||||
<PublishTrimmed>true</PublishTrimmed>
|
||||
<TrimMode>link</TrimMode>
|
||||
<OptimizationPreference>Speed</OptimizationPreference>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -102,6 +102,12 @@ namespace SourceGit.ViewModels
|
|||
set => SetProperty(ref _defaultFontSize, value);
|
||||
}
|
||||
|
||||
public double EditorFontSize
|
||||
{
|
||||
get => _editorFontSize;
|
||||
set => SetProperty(ref _editorFontSize, value);
|
||||
}
|
||||
|
||||
public LayoutInfo Layout
|
||||
{
|
||||
get => _layout;
|
||||
|
@ -579,6 +585,7 @@ namespace SourceGit.ViewModels
|
|||
private bool _onlyUseMonoFontInEditor = false;
|
||||
private bool _useSystemWindowFrame = false;
|
||||
private double _defaultFontSize = 13;
|
||||
private double _editorFontSize = 13;
|
||||
private LayoutInfo _layout = new LayoutInfo();
|
||||
|
||||
private int _maxHistoryCommits = 20000;
|
||||
|
|
|
@ -599,7 +599,8 @@ namespace SourceGit.ViewModels
|
|||
byParentFolder.IsVisible = !isRooted;
|
||||
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;
|
||||
};
|
||||
addToIgnore.Items.Add(byParentFolder);
|
||||
|
@ -620,7 +621,8 @@ namespace SourceGit.ViewModels
|
|||
byExtensionInSameFolder.IsVisible = !isRooted;
|
||||
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;
|
||||
};
|
||||
addToIgnore.Items.Add(byExtensionInSameFolder);
|
||||
|
|
|
@ -57,6 +57,7 @@
|
|||
Background="Transparent"
|
||||
Foreground="{DynamicResource Brush.FG1}"
|
||||
FontFamily="{DynamicResource Fonts.Monospace}"
|
||||
FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=EditorFontSize}"
|
||||
BlameData="{Binding Data}"/>
|
||||
|
||||
<!-- Not supported mask (for binary files) -->
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
xmlns:m="using:SourceGit.Models"
|
||||
xmlns:v="using:SourceGit.Views"
|
||||
xmlns:vm="using:SourceGit.ViewModels"
|
||||
xmlns:c="using:SourceGit.Converters"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="SourceGit.Views.LauncherPage"
|
||||
x:DataType="vm:LauncherPage">
|
||||
|
@ -38,103 +39,100 @@
|
|||
</ContentControl.DataTemplates>
|
||||
</ContentControl>
|
||||
</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">
|
||||
<ContentControl Content="{Binding Popup}" Background="{DynamicResource Brush.Popup}">
|
||||
<ContentControl.DataTemplates>
|
||||
<DataTemplate DataType="vm:Popup">
|
||||
<StackPanel Orientation="Vertical" Background="{DynamicResource Brush.Popup}">
|
||||
<!-- Popup Widget -->
|
||||
<ContentPresenter Margin="8,16,8,8"
|
||||
Content="{Binding View}"
|
||||
IsHitTestVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}"/>
|
||||
<!-- Floating -->
|
||||
<Grid Grid.Row="1" ClipToBounds="True">
|
||||
<Grid.IsVisible>
|
||||
<MultiBinding Converter="{x:Static BoolConverters.Or}">
|
||||
<Binding Path="Popup" Converter="{x:Static ObjectConverters.IsNotNull}"/>
|
||||
<Binding Path="Notifications.Count" Converter="{x:Static c:IntConverters.IsGreaterThanZero}"/>
|
||||
</MultiBinding>
|
||||
</Grid.IsVisible>
|
||||
|
||||
<!-- 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"/>
|
||||
<Border Background="Transparent"
|
||||
PointerPressed="OnMaskClicked"
|
||||
IsVisible="{Binding Popup, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||||
|
||||
<Grid RowDefinitions="Auto,*" Width="512" HorizontalAlignment="Center">
|
||||
<!-- Popup -->
|
||||
<Border Grid.Row="0"
|
||||
Margin="6,0"
|
||||
Effect="drop-shadow(0 0 8 #8F000000)"
|
||||
CornerRadius="0,0,8,8"
|
||||
ClipToBounds="True"
|
||||
IsVisible="{Binding Popup, Converter={x:Static ObjectConverters.IsNotNull}}">
|
||||
<ContentControl Content="{Binding Popup}" Background="{DynamicResource Brush.Popup}">
|
||||
<ContentControl.DataTemplates>
|
||||
<DataTemplate DataType="vm:Popup">
|
||||
<StackPanel Orientation="Vertical" Background="{DynamicResource Brush.Popup}">
|
||||
<!-- Popup Widget -->
|
||||
<ContentPresenter Margin="8,16,8,8"
|
||||
Content="{Binding View}"
|
||||
IsHitTestVisible="{Binding InProgress, Converter={x:Static BoolConverters.Not}}"/>
|
||||
|
||||
<!-- 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>
|
||||
</DataTemplate>
|
||||
</ContentControl.DataTemplates>
|
||||
</ContentControl>
|
||||
</Border>
|
||||
|
||||
<!-- Running -->
|
||||
<v:PopupRunningStatus Margin="12,8"
|
||||
Description="{Binding ProgressDescription}"
|
||||
IsVisible="{Binding InProgress}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ContentControl.DataTemplates>
|
||||
</ContentControl>
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<!-- Notification -->
|
||||
<Grid Grid.Row="1" Width="480" HorizontalAlignment="Right" VerticalAlignment="Top">
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl ItemsSource="{Binding Notifications}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="m:Notification">
|
||||
<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>
|
||||
<!-- Notifications -->
|
||||
<ScrollViewer Grid.Row="1" Margin="0,6,0,0" VerticalAlignment="Top" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
<ItemsControl ItemsSource="{Binding Notifications}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="m:Notification">
|
||||
<Border Margin="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">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto" Margin="8,0">
|
||||
<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}"/>
|
||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Error}" IsVisible="{Binding IsError}"/>
|
||||
<TextBlock Grid.Column="1" Margin="8,0,0,0" FontWeight="Bold" FontSize="14" Text="{DynamicResource Text.Launcher.Info}" IsVisible="{Binding !IsError}"/>
|
||||
<Button Grid.Column="2" Classes="icon_button" Width="16" Height="16" Click="OnDismissNotification">
|
||||
<Path Width="10" Height="10" Data="{StaticResource Icons.Window.Close}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<TextBox Grid.Row="1"
|
||||
Classes="no_background no_border"
|
||||
IsReadOnly="True"
|
||||
TextWrapping="Wrap"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
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>
|
||||
<ScrollViewer Grid.Row="1" Margin="8" MaxHeight="100" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
||||
<SelectableTextBlock TextWrapping="Wrap" Text="{Binding Message}"/>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Border>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace SourceGit.Views
|
|||
e.Handled = true;
|
||||
}
|
||||
|
||||
private void OnPopupCancelByClickMask(object sender, PointerPressedEventArgs e)
|
||||
private void OnMaskClicked(object sender, PointerPressedEventArgs e)
|
||||
{
|
||||
OnPopupCancel(sender, e);
|
||||
}
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
<TabItem.Header>
|
||||
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Appearance}"/>
|
||||
</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"
|
||||
Text="{DynamicResource Text.Preference.Appearance.Theme}"
|
||||
HorizontalAlignment="Right"
|
||||
|
@ -170,10 +170,22 @@
|
|||
Value="{Binding DefaultFontSize, Mode=TwoWay}"/>
|
||||
|
||||
<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}"
|
||||
HorizontalAlignment="Right"
|
||||
Margin="0,0,16,0"/>
|
||||
<TextBox Grid.Row="4" Grid.Column="1"
|
||||
<TextBox Grid.Row="5" Grid.Column="1"
|
||||
Height="28"
|
||||
CornerRadius="3"
|
||||
Text="{Binding ThemeOverrides, Mode=TwoWay}">
|
||||
|
@ -184,16 +196,16 @@
|
|||
</TextBox.InnerRightContent>
|
||||
</TextBox>
|
||||
|
||||
<CheckBox Grid.Row="5" Grid.Column="1"
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
Content="{DynamicResource Text.Preference.Appearance.OnlyUseMonoFontInEditor}"
|
||||
IsChecked="{Binding OnlyUseMonoFontInEditor, Mode=TwoWay}"/>
|
||||
|
||||
<CheckBox Grid.Row="6" Grid.Column="1"
|
||||
<CheckBox Grid.Row="7" Grid.Column="1"
|
||||
Height="32"
|
||||
Content="{DynamicResource Text.Preference.Appearance.UseFixedTabWidth}"
|
||||
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"
|
||||
Content="{DynamicResource Text.Preference.Appearance.UseNativeWindowFrame}"
|
||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSystemWindowFrame, Mode=OneTime}"
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:m="using:SourceGit.Models"
|
||||
xmlns:v="using:SourceGit.Views"
|
||||
xmlns:vm="using:SourceGit.ViewModels"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="SourceGit.Views.RevisionFileContentViewer">
|
||||
<UserControl.DataTemplates>
|
||||
|
@ -19,7 +20,9 @@
|
|||
</DataTemplate>
|
||||
|
||||
<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 DataType="m:RevisionImageFile">
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
DeletedHighlightBrush="{DynamicResource Brush.Diff.DeletedHighlight}"
|
||||
IndicatorForeground="{DynamicResource Brush.FG2}"
|
||||
FontFamily="{DynamicResource Fonts.Monospace}"
|
||||
FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=EditorFontSize}"
|
||||
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting}"
|
||||
WordWrap="{Binding Source={x:Static vm:Preference.Instance}, Path=EnableDiffViewWordWrap}"
|
||||
ShowHiddenSymbols="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView}"
|
||||
|
@ -44,6 +45,7 @@
|
|||
DeletedHighlightBrush="{DynamicResource Brush.Diff.DeletedHighlight}"
|
||||
IndicatorForeground="{DynamicResource Brush.FG2}"
|
||||
FontFamily="{DynamicResource Fonts.Monospace}"
|
||||
FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=EditorFontSize}"
|
||||
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting}"
|
||||
WordWrap="False"
|
||||
ShowHiddenSymbols="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView}"
|
||||
|
@ -64,6 +66,7 @@
|
|||
DeletedHighlightBrush="{DynamicResource Brush.Diff.DeletedHighlight}"
|
||||
IndicatorForeground="{DynamicResource Brush.FG2}"
|
||||
FontFamily="{DynamicResource Fonts.Monospace}"
|
||||
FontSize="{Binding Source={x:Static vm:Preference.Instance}, Path=EditorFontSize}"
|
||||
UseSyntaxHighlighting="{Binding Source={x:Static vm:Preference.Instance}, Path=UseSyntaxHighlighting}"
|
||||
WordWrap="False"
|
||||
ShowHiddenSymbols="{Binding Source={x:Static vm:Preference.Instance}, Path=ShowHiddenSymbolsInDiffView}"
|
||||
|
|
Loading…
Reference in a new issue