mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 21:24:59 +00:00
ux: icons
This commit is contained in:
parent
a597845bb4
commit
684fedb9bd
18 changed files with 52 additions and 52 deletions
|
@ -1,4 +1,6 @@
|
|||
using Avalonia.Data.Converters;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace SourceGit.Converters
|
||||
|
@ -6,9 +8,12 @@ namespace SourceGit.Converters
|
|||
public static class BookmarkConverters
|
||||
{
|
||||
public static readonly FuncValueConverter<int, IBrush> ToBrush =
|
||||
new FuncValueConverter<int, IBrush>(bookmark => Models.Bookmarks.Brushes[bookmark]);
|
||||
|
||||
public static readonly FuncValueConverter<int, double> ToStrokeThickness =
|
||||
new FuncValueConverter<int, double>(bookmark => bookmark == 0 ? 1.0 : 0);
|
||||
new FuncValueConverter<int, IBrush>(bookmark =>
|
||||
{
|
||||
if (bookmark == 0)
|
||||
return Application.Current?.FindResource("Brush.FG1") as IBrush;
|
||||
else
|
||||
return Models.Bookmarks.Brushes[bookmark];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue