diff --git a/src/client/spark/core/FontsAndColors/BTSColors.cs b/src/client/spark/core/FontsAndColors/BTSColors.cs index e30e8bbd2..1e72d3702 100644 --- a/src/client/spark/core/FontsAndColors/BTSColors.cs +++ b/src/client/spark/core/FontsAndColors/BTSColors.cs @@ -142,12 +142,24 @@ namespace mbts.ui public static BTSColor pnl_profit_text { get { return text_default; } } } - public static class Orders - { + public static class Orders { + // 'sent' and 'filled_dark' are used in the ladder log viewer to indicate sent/filled orders (both buys and sells) + // '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 = new SolidColorBrush(_sent), _filled_dark_brush = new SolidColorBrush(filled_dark); + + static Orders() { + _sent_brush.Freeze(); + _filled_dark_brush.Freeze(); + } + // Base Colors [DisplayInfo(name = "Orders")] public static BTSColor default_background { get { return BTSCoreColors.blue_light_lighter; } } public static BTSColor default_text { get { return BTSCoreColors.black; } } + public static BTSColor sent => _sent; + public static Brush sent_brush => _sent_brush; [DisplayInfo(name = "Price")] public static BTSColor price_background { get { return BTSCoreColors.blue_light_dark; } } @@ -160,6 +172,8 @@ namespace mbts.ui public static BTSColor working_cancel_text { get { return BTSCoreColors.white; } } public static BTSColor filled { get { return BTSCoreColors.green_light_light_saturated; } } + public static BTSColor filled_dark => BTSCoreColors.green; // used in ladder log viewer + public static BTSColor modified => orange; // used in the ladder log viewer [DisplayInfo(name = "Order Buy Text")] public static BTSColor order_buy_text { get { return BTSCoreColors.black; } } diff --git a/src/client/spark/view/Spark/Ladder/LadderVM.cs b/src/client/spark/view/Spark/Ladder/LadderVM.cs index 1a1df4d63..fe3abe92c 100644 --- a/src/client/spark/view/Spark/Ladder/LadderVM.cs +++ b/src/client/spark/view/Spark/Ladder/LadderVM.cs @@ -11,17 +11,16 @@ using System.Linq; using System.Reactive.Linq; using System.Threading.Tasks; using System.Windows.Input; -using System.Windows.Media; namespace mbts.spark { static class OrderLogCategories { //Order Color (darker purple) 0x77, 0x33, 0xAA, loud //Order Color (lighter purple) 0x92, 0x7B, 0xBE, soft //Order Color (medium purple) 0x92, 0x5B, 0xBE - public static ILogViewerCategory order => new LogViewerCategory("Order", new SolidColorBrush(Color.FromRgb(0x92, 0x5B, 0xBE))); - public static ILogViewerCategory fill = new LogViewerCategory("Fill", Brushes.Green); - public static ILogViewerCategory cancel = new LogViewerCategory("Cancel", Brushes.Red); - public static ILogViewerCategory modify = new LogViewerCategory("Modify", Brushes.Orange); + public static ILogViewerCategory order => new LogViewerCategory("Order", BTSColors.Orders.sent_brush); + public static ILogViewerCategory fill = new LogViewerCategory("Fill", BTSColors.Orders.filled_dark); + public static ILogViewerCategory cancel = new LogViewerCategory("Cancel", BTSColors.Orders.working_cancel); + public static ILogViewerCategory modify = new LogViewerCategory("Modify", BTSColors.Orders.modified); } class LadderVM : DisposableViewModelBase, IKeyListener {