mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-24 13:45:00 +00:00
refactor<*>: use DynamicResource instead of StaticResource for brushes and locales
This commit is contained in:
parent
4a56b47265
commit
afc4eafb6f
73 changed files with 630 additions and 601 deletions
|
@ -62,6 +62,7 @@ namespace SourceGit.Views.Widgets {
|
|||
private List<Rectangle> splitters = new List<Rectangle>();
|
||||
|
||||
public DiffViewer() {
|
||||
Models.Theme.AddListener(this, Reload);
|
||||
InitializeComponent();
|
||||
Reset();
|
||||
}
|
||||
|
@ -223,6 +224,7 @@ namespace SourceGit.Views.Widgets {
|
|||
block.OldLine = line.OldLine;
|
||||
block.NewLine = line.NewLine;
|
||||
|
||||
|
||||
if (line.OldLine.Length > 0) lastOldLine = line.OldLine;
|
||||
if (line.NewLine.Length > 0) lastNewLine = line.NewLine;
|
||||
|
||||
|
@ -402,10 +404,10 @@ namespace SourceGit.Views.Widgets {
|
|||
private void AddSplitter(int column, double offset) {
|
||||
var split = new Rectangle();
|
||||
split.Width = 1;
|
||||
split.Fill = FindResource("Brush.Border2") as Brush;
|
||||
split.HorizontalAlignment = HorizontalAlignment.Left;
|
||||
split.Margin = new Thickness(offset, 0, 0, 0);
|
||||
split.SetValue(Grid.ColumnProperty, column);
|
||||
split.SetResourceReference(Rectangle.FillProperty, "Brush.Border2");
|
||||
|
||||
textDiff.Children.Add(split);
|
||||
splitters.Add(split);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue