-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4279d44
commit 1daf5a2
Showing
6 changed files
with
119 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,53 @@ | ||
using Avalonia.Media; | ||
using Avalonia; | ||
using Avalonia.Media; | ||
using Avalonia.Styling; | ||
|
||
namespace SukiUI.ColorTheme; | ||
|
||
public static class NotificationColor | ||
{ | ||
public static readonly SolidColorBrush InfoIconForeground = new(Color.FromRgb(47,84,235)); | ||
public static readonly SolidColorBrush SuccessIconForeground = new(Color.FromRgb(56,158,13)); | ||
public static readonly SolidColorBrush WarningIconForeground = new(Color.FromRgb(240,140,22)); | ||
public static readonly SolidColorBrush ErrorIconForeground = new(Color.FromRgb(236,63,48)); | ||
public static readonly LinearGradientBrush InfoIconForeground = new LinearGradientBrush() | ||
{ | ||
EndPoint = new RelativePoint(0, 0, RelativeUnit.Relative), | ||
StartPoint = new RelativePoint(1, 1, RelativeUnit.Relative), | ||
GradientStops = new GradientStops() | ||
{ | ||
new() { Color = Color.FromRgb(89,126,247), Offset = 0.3 }, | ||
new() { Color = Color.FromRgb(47,84,235), Offset = 1 }, | ||
|
||
} | ||
}; | ||
public static readonly LinearGradientBrush SuccessIconForeground = new LinearGradientBrush() | ||
{ | ||
EndPoint = new RelativePoint(0, 0, RelativeUnit.Relative), | ||
StartPoint = new RelativePoint(1, 1, RelativeUnit.Relative), | ||
GradientStops = new GradientStops() | ||
{ | ||
new() { Color = Color.FromRgb(82,196,26), Offset = 0.3 }, | ||
new() { Color = Color.FromRgb(56,158,13), Offset = 1 }, | ||
|
||
} | ||
}; | ||
public static readonly LinearGradientBrush WarningIconForeground = new LinearGradientBrush() | ||
{ | ||
EndPoint = new RelativePoint(0, 0, RelativeUnit.Relative), | ||
StartPoint = new RelativePoint(1, 1, RelativeUnit.Relative), | ||
GradientStops = new GradientStops() | ||
{ | ||
new() { Color = Color.FromRgb(255,169,64), Offset = 0.3 }, | ||
new() { Color = Color.FromRgb(250,140,22), Offset = 1 }, | ||
|
||
} | ||
}; | ||
public static readonly LinearGradientBrush ErrorIconForeground = new LinearGradientBrush() | ||
{ | ||
EndPoint = new RelativePoint(0, 0, RelativeUnit.Relative), | ||
StartPoint = new RelativePoint(1, 1, RelativeUnit.Relative), | ||
GradientStops = new GradientStops() | ||
{ | ||
new() { Color = Color.FromRgb(255,77,79), Offset = 0.3 }, | ||
new() { Color = Color.FromRgb(245,34,45), Offset = 1 }, | ||
|
||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Globalization; | ||
using Avalonia.Data.Converters; | ||
using Avalonia.Media.Immutable; | ||
|
||
namespace SukiUI.Dialogs | ||
{ | ||
public class DialogContentMaxWidthValueConverter: IValueConverter | ||
{ | ||
|
||
public static readonly DialogContentMaxWidthValueConverter Instance = new(); | ||
|
||
public object? Convert(object? value, Type targetType, object? parameter, | ||
CultureInfo culture) | ||
{ | ||
if (value is string) | ||
return 450; | ||
|
||
return 2000; | ||
} | ||
|
||
public object ConvertBack(object? value, Type targetType, | ||
object? parameter, CultureInfo culture) | ||
{ | ||
throw new NotSupportedException(); | ||
} | ||
|
||
} | ||
} |