ui (pnl): Use gray font color when pnl is zero
This commit is contained in:
1 parent
1c2027506a
commit
2aef052398
2 files changed
+7
-9
No files matched your search
@@ -593,8 +593,8 @@ namespace bts.shell.pnl {
|
||||
public static IEnumerable<GridColumnSettings> group_columns {
|
||||
get {
|
||||
var rv = all.Select(cs => cs.with(font_weight_override: new NullableFontWeightProto(FontWeights.Bold))).ToList();
|
||||
GridSettingsHelper.try_replace_column(rv, Columns.SODPNL, _override_color);
|
||||
GridSettingsHelper.try_replace_column(rv, Columns.DayPNL, _override_color);
|
||||
GridSettingsHelper.try_replace_column(rv, Columns.SODPNL, _to_pnl_col);
|
||||
GridSettingsHelper.try_replace_column(rv, Columns.DayPNL, _to_pnl_col);
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
@@ -602,17 +602,14 @@ namespace bts.shell.pnl {
|
||||
public static IEnumerable<GridColumnSettings> header_columns {
|
||||
get {
|
||||
var rv = all.Select(cs => cs.with(font_weight_override: new NullableFontWeightProto(FontWeights.Bold))).ToList();
|
||||
GridSettingsHelper.try_replace_column(rv, Columns.SODPNL, _override_color);
|
||||
GridSettingsHelper.try_replace_column(rv, Columns.DayPNL, _override_color);
|
||||
GridSettingsHelper.try_replace_column(rv, Columns.SODPNL, _to_pnl_col);
|
||||
GridSettingsHelper.try_replace_column(rv, Columns.DayPNL, _to_pnl_col);
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
static GridColumnSettings _override_color(GridColumnSettings col_settings) =>
|
||||
_override_color(col_settings, 0);
|
||||
|
||||
static GridColumnSettings _override_color(GridColumnSettings col_settings, uint color) =>
|
||||
col_settings.with(font_color_override: new NullableColorProto(color));
|
||||
static GridColumnSettings _to_pnl_col(GridColumnSettings cs) =>
|
||||
cs.with(font_color_override: new(BTSColors.PNL.net_zero));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -253,6 +253,7 @@ namespace mbts.ui {
|
||||
public static BTSColor foreground => UI.default_foreground;
|
||||
public static BTSColor anchor => Colors.Gold;
|
||||
public static BTSColor profit => Colors.Green;
|
||||
public static BTSColor net_zero => BTSCoreColors.gray;
|
||||
public static BTSColor loss => BTSCoreColors.venetian_red;
|
||||
public static BTSColor header_row_background => 0xffaaaaaa;
|
||||
// group background colors
|
||||
|
||||
Reference in new issue
Block a user