app: more fixes to last dashboard commit

Don't show percentage for the swap read/written fields, and make
sure their history underlays are displayed correctly even if the
swap limit changes.
This commit is contained in:
Ell 2018-06-21 07:36:52 -04:00
parent 1c1dd2038e
commit fda671841c
1 changed files with 7 additions and 8 deletions

View File

@ -672,14 +672,14 @@ static const GroupInfo groups[] =
.default_active = FALSE,
.show_in_header = FALSE,
.meter_variable = VARIABLE_SWAP_READING,
.meter_value = 1
.meter_value = 2
},
{ .variable = VARIABLE_SWAP_WRITTEN,
.default_active = FALSE,
.show_in_header = FALSE,
.meter_variable = VARIABLE_SWAP_WRITING,
.meter_value = 2
.meter_value = 1
},
{}
@ -1577,11 +1577,9 @@ gimp_dashboard_sample (GimpDashboard *dashboard)
variable);
if (variables[variable].type == VARIABLE_TYPE_BOOLEAN &&
group_info->meter_limit &&
value)
{
value = gimp_dashboard_variable_to_double (
dashboard, group_info->meter_limit);
value = G_MAXDOUBLE;
}
if (field_info->meter_cumulative)
@ -2952,6 +2950,7 @@ gimp_dashboard_field_to_string (GimpDashboard *dashboard,
if (show_limit &&
variable_data->available &&
field_info->meter_value &&
! field_info->meter_variable &&
group_data->limit)
{
gdouble value;