config toggle to show/hide ladder scrollbar for dj (defaults to hide)

This commit is contained in:
John Colvin committed 2020-09-24 16:25:43 -05:00
1 parent 3503946011
commit 4992f4e0cf
2 files changed
+4

No files matched your search

@@ -29,6 +29,7 @@ using System.Windows.Media.Animation;
namespace mbts.spark {
partial class LadderGridHost : Control {
const int _min_row_count = 501, _max_row_count = 2001;
static readonly bool _show_scrollbar = config.Configuration.get<bts.config.LadderKnobs>().show_scrollbar;
int _row_count = _min_row_count;
@@ -82,6 +83,8 @@ namespace mbts.spark {
_ordershost = new LadderOrdersHost(this) { HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Stretch };
var scrollViewerFactory = new FrameworkElementFactory(typeof(ScrollViewer));
scrollViewerFactory.SetValue(FocusableProperty, false);
if (!_show_scrollbar)
scrollViewerFactory.SetValue(ScrollViewer.VerticalScrollBarVisibilityProperty, ScrollBarVisibility.Hidden);
Template = new ControlTemplate() {
VisualTree = scrollViewerFactory
};
+1
View File
@@ -72,6 +72,7 @@ message LadderKnobs {
optional bool open_algo_popup_on_select = 6 [default = false];
optional bool use_algo_param_grid = 7 [default = true];
optional uint32 max_mbo_orders = 8 [default = 200];
optional bool show_scrollbar = 9 [default = false];
}
message OrderBookOptions {