equal
deleted
inserted
replaced
157 (node_status.running, PIDE.options.color_value("running_color")), |
157 (node_status.running, PIDE.options.color_value("running_color")), |
158 (node_status.warned, PIDE.options.color_value("warning_color")), |
158 (node_status.warned, PIDE.options.color_value("warning_color")), |
159 (node_status.failed, PIDE.options.color_value("error_color")) |
159 (node_status.failed, PIDE.options.color_value("error_color")) |
160 ).filter(_._1 > 0) |
160 ).filter(_._1 > 0) |
161 |
161 |
162 ((size.width - 2) /: segments)({ case (last, (n, color)) => |
162 segments.foldLeft(size.width - 2)({ case (last, (n, color)) => |
163 val w = (n * ((size.width - 4) - segments.length) / node_status.total) max 4 |
163 val w = (n * ((size.width - 4) - segments.length) / node_status.total) max 4 |
164 paint_segment(last - w, w, color) |
164 paint_segment(last - w, w, color) |
165 last - w - 1 |
165 last - w - 1 |
166 }) |
166 }) |
167 |
167 |