From a53dfd14b1eb122916bd877028eb9b243a7669e9 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Thu, 28 Apr 2022 15:40:02 -0400 Subject: [PATCH] ui: Refine combo win * make call/put toggle a spark menu item (in the toolbar) * dock account/risk terms to the left * hide account/risk terms labels (show them as tooltips instead) --- src/client/spark/Images/Icons.cs | 17 ++++++++ src/client/spark/Images/Vector/Icons.xaml | 6 +++ .../spark/Risk/Combo/ComboReportSettings.cs | 6 ++- src/client/spark/Risk/Combo/ComboReportVM.cs | 22 ++++++++--- .../spark/Risk/Combo/ComboReportView.xaml | 39 ++++++++++--------- .../spark/Risk/Combo/ComboReportWindow.cs | 17 ++++++++ 6 files changed, 82 insertions(+), 25 deletions(-) diff --git a/src/client/spark/Images/Icons.cs b/src/client/spark/Images/Icons.cs index f255e48f3..1116aadfa 100644 --- a/src/client/spark/Images/Icons.cs +++ b/src/client/spark/Images/Icons.cs @@ -1,4 +1,5 @@ using bts; +using bts.collections; using bts.utils; using mbts.ui.dpi; @@ -28,6 +29,7 @@ namespace mbts.ui { AddFileThinGeometryKey = nameof(AddFileThinGeometryKey), ArrowGeometryKey = nameof(ArrowGeometryKey), AttachAlgosKey = nameof(AttachAlgosKey), + CallPutGeometryKey = nameof(CallPutGeometryKey), CheckMarkGeometryKey = nameof(CheckMarkGeometryKey), CopyWFGeometryKey = nameof(CopyWFGeometryKey), CopyBoxesGeometryKey = nameof(CopyBoxesGeometryKey), @@ -167,6 +169,21 @@ namespace mbts.ui { public static ImageSource analytics => Math; public static ImageSource ModifyOrder { get { return load_resource_and_freeze("ModifyOrder"); } } + + public static ImageSource call_put_checked => + create_checked_icon( + CallPutGeometryKey, + brush: Brushes.Black, + check_brush: Brushes.Black, + check_off_x_pct: 0.9); + + public static ImageSource call_put_unchecked => + create_checked_icon( + CallPutGeometryKey, + brush: Brushes.Black, + check_brush: Brushes.Transparent, + check_off_x_pct: 0.9); + public static ImageSource CheckMark => create_icon(CheckMarkGeometryKey); public static ImageSource ChevronRight => new DrawingImage(create_chevron_right_drawing()); public static ImageSource ChevronDown => new DrawingImage(create_chevron_down_drawing()); diff --git a/src/client/spark/Images/Vector/Icons.xaml b/src/client/spark/Images/Vector/Icons.xaml index f4e8dffb2..2dd0102e8 100644 --- a/src/client/spark/Images/Vector/Icons.xaml +++ b/src/client/spark/Images/Vector/Icons.xaml @@ -423,6 +423,12 @@ M15.999513,0C16.50052,-3.8678991E-07,17.001274,0.21826346,17.288297,0.65479128L31.74151,22.585975C32.057495,23.064982 32.084472,23.677966 31.812494,24.184989 31.541494,24.687009 31.02049,24.999999 30.450475,24.999999L1.5480773,24.999999C0.97903845,24.999999 0.45705819,24.687009 0.18703459,24.184989 -0.085979476,23.677966 -0.057963934,23.064982 0.25704309,22.585975L14.709219,0.65479128C14.997247,0.21826346,15.498506,-3.8678991E-07,15.999513,0z + + + M 11.736 2.328 L 11.04 4.248 Q 10.296 3.888 9.516 3.672 Q 8.846 3.486 7.972 3.46 A 9.769 9.769 0 0 0 7.68 3.456 A 5.081 5.081 0 0 0 5.783 3.805 A 4.795 4.795 0 0 0 4.932 4.248 A 5.08 5.08 0 0 0 3.404 5.827 A 6.475 6.475 0 0 0 3.024 6.528 Q 2.383 7.9 2.332 9.802 A 12.382 12.382 0 0 0 2.328 10.128 A 10.047 10.047 0 0 0 2.476 11.893 A 7.423 7.423 0 0 0 3.012 13.656 A 6.163 6.163 0 0 0 3.873 15.055 A 5.142 5.142 0 0 0 4.908 16.008 A 4.729 4.729 0 0 0 7.583 16.847 A 5.734 5.734 0 0 0 7.68 16.848 A 8.092 8.092 0 0 0 8.633 16.795 Q 9.227 16.724 9.72 16.56 Q 10.584 16.272 11.4 15.816 L 12.096 17.712 A 9.015 9.015 0 0 1 11.017 18.203 A 11.495 11.495 0 0 1 10.068 18.516 Q 9.002 18.819 7.61 18.839 A 13.78 13.78 0 0 1 7.416 18.84 Q 5.232 18.84 3.552 17.796 A 6.864 6.864 0 0 1 1.182 15.289 A 8.38 8.38 0 0 1 0.936 14.82 A 9.027 9.027 0 0 1 0.192 12.488 Q 0.006 11.464 0 10.299 A 15.082 15.082 0 0 1 0 10.224 Q 0 7.656 0.948 5.676 Q 1.896 3.696 3.636 2.58 A 7.049 7.049 0 0 1 6.679 1.521 A 8.95 8.95 0 0 1 7.704 1.464 A 10.953 10.953 0 0 1 8.918 1.528 A 8.448 8.448 0 0 1 9.888 1.692 A 9.174 9.174 0 0 1 11.682 2.303 A 8.552 8.552 0 0 1 11.736 2.328 Z M 28.296 18.552 L 26.016 18.552 L 26.016 1.8 Q 27 1.68 28.188 1.62 A 48.193 48.193 0 0 1 30.331 1.561 A 53.263 53.263 0 0 1 30.648 1.56 Q 32.736 1.56 34.2 2.22 A 5.906 5.906 0 0 1 35.42 2.947 A 4.65 4.65 0 0 1 36.432 4.032 Q 37.2 5.184 37.2 6.672 A 6.062 6.062 0 0 1 37.03 8.141 A 4.624 4.624 0 0 1 36.312 9.72 A 5.355 5.355 0 0 1 34.5 11.311 A 6.736 6.736 0 0 1 33.84 11.628 A 8.346 8.346 0 0 1 31.899 12.162 A 11.327 11.327 0 0 1 30.168 12.288 A 24.966 24.966 0 0 1 29.08 12.265 A 19.903 19.903 0 0 1 28.296 12.216 L 28.296 18.552 Z M 22.728 0.6 L 15.96 20.256 L 14.184 19.656 L 20.952 0 L 22.728 0.6 Z M 28.296 3.576 L 28.296 10.272 A 11.512 11.512 0 0 0 28.608 10.306 Q 28.747 10.32 28.904 10.332 A 23.1 23.1 0 0 0 29.232 10.356 Q 29.784 10.392 30.456 10.392 Q 32.592 10.392 33.768 9.432 A 3.095 3.095 0 0 0 34.933 7.166 A 4.157 4.157 0 0 0 34.944 6.864 A 3.468 3.468 0 0 0 34.762 5.714 A 2.913 2.913 0 0 0 33.816 4.392 A 3.711 3.711 0 0 0 32.597 3.753 Q 31.742 3.48 30.6 3.48 Q 29.952 3.48 29.376 3.504 Q 28.8 3.528 28.296 3.576 Z + + +