Freeze brushes by default
This commit is contained in:
1 parent
081fd61793
commit
3c44f0746b
2 files changed
+4
-9
No files matched your search
@@ -185,7 +185,9 @@ namespace mbts.ui
|
||||
|
||||
static public implicit operator System.Windows.Media.Brush(BTSColor x)
|
||||
{
|
||||
return new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromArgb(x.A, x.R, x.G, x.B));
|
||||
var v = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromArgb(x.A, x.R, x.G, x.B));
|
||||
v.Freeze();
|
||||
return v;
|
||||
}
|
||||
|
||||
static public implicit operator BTSColor(System.Windows.Media.SolidColorBrush x)
|
||||
|
||||
@@ -147,14 +147,7 @@ namespace mbts.ui {
|
||||
// 'default_background' and 'filled' seemed too pale against the log viewer's current style
|
||||
// as we restyle the ladder, and perhaps the log viewer, maybe this will change, in the meantime, here they are.
|
||||
static readonly BTSColor _sent = new BTSColor(0x92, 0x5B, 0xBE);
|
||||
static readonly Brush _sent_brush, _filled_dark_brush;
|
||||
|
||||
static Orders() {
|
||||
_sent_brush = new SolidColorBrush(_sent);
|
||||
_filled_dark_brush = new SolidColorBrush(filled_dark);
|
||||
_sent_brush.Freeze();
|
||||
_filled_dark_brush.Freeze();
|
||||
}
|
||||
static readonly Brush _sent_brush = _sent, _filled_dark_brush = _sent;
|
||||
|
||||
// Base Colors
|
||||
[DisplayInfo(name = "Orders")]
|
||||
|
||||
Reference in new issue
Block a user