Merged in SP-278-smaller-ladder-columns (pull request #394)
SP-278 Smaller minimum size for Ladder columns Approved-by: Jake Norbut <jake.norbut@bluetradesys.com> Approved-by: Kevin Darby <kevin.darby@bluetradesys.com>
This commit is contained in:
commit
747a687fe5
2 files changed
+6
-3
No files matched your search
@@ -28,7 +28,8 @@ using System.Windows.Media.Animation;
|
||||
|
||||
namespace mbts.spark {
|
||||
partial class LadderGridHost : Control {
|
||||
const int _min_row_count = 501, _max_row_count = 2001, _column_min_width = 8;
|
||||
const int _min_row_count = 501, _max_row_count = 2001;
|
||||
|
||||
int _row_count = _min_row_count;
|
||||
|
||||
readonly VisualHost _visualHost = new VisualHost();
|
||||
@@ -108,6 +109,8 @@ namespace mbts.spark {
|
||||
|
||||
public event Action visible_columns_changed;
|
||||
|
||||
public static double ColumnMinWidth => 6;
|
||||
|
||||
public IEnumerable<ColumnType> visible_column_types =>
|
||||
columns.Where(c => c.settings.show)
|
||||
.Select(c => c.column_type);
|
||||
@@ -572,7 +575,7 @@ namespace mbts.spark {
|
||||
case ColumnType.Price: new_col_width = (int)price_column_width; break;
|
||||
case ColumnType.Ask: new_col_width = (int)ask_column_width; break;
|
||||
case ColumnType.Volume: new_col_width = (int)VolumeColumnWidth; break;
|
||||
default: new_col_width = (int)Math.Max((double)column.settings.width + adjustment, _column_min_width); break;
|
||||
default: new_col_width = (int)Math.Max((double)column.settings.width + adjustment, ColumnMinWidth); break;
|
||||
}
|
||||
int true_adj = new_col_width - (int)column.settings.width;
|
||||
column.settings.width = (uint)new_col_width;
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<Setter Property="BorderThickness" Value="0,0,1,0"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||
<Setter Property="Height" Value="23" />
|
||||
<Setter Property="MinWidth" Value="30" />
|
||||
<Setter Property="MinWidth" Value="{x:Static spark:LadderGridHost.ColumnMinWidth}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type GridViewColumnHeader}">
|
||||
|
||||
Reference in new issue
Block a user