[gantt] pad sub-op ID width

pull/1205/head
Tim Stack 10 months ago
parent 880d31ea0a
commit 921bc0a3d3

@ -288,7 +288,10 @@ gantt_header_overlay::list_value_for_overlay(
sub.ostr_level_stats.lls_warning_count, total_msgs)))
.append(" ")
.append(lnav::roles::identifier(sub.ostr_subid.to_string()))
.append(" ")
.append(row.or_max_subid_width
- sub.ostr_subid.utf8_length().unwrapOr(
row.or_max_subid_width),
' ')
.append(sub.ostr_description);
al.with_attr_for_all(VC_ROLE.value(role_t::VCR_COMMENT));
@ -566,6 +569,12 @@ gantt_source::rebuild_indexes()
.first;
}
sub.ostr_subid = subid_iter->first;
if (sub.ostr_subid.length()
> active_iter->second.or_max_subid_width)
{
active_iter->second.or_max_subid_width
= sub.ostr_subid.length();
}
}
if (otr.otr_description.lod_id) {

@ -111,6 +111,7 @@ public:
std::map<intern_string_t,
std::map<intern_string_t, std::map<size_t, std::string>>>
or_descriptions;
size_t or_max_subid_width{0};
std::string or_description;
bool operator<(const opid_row& rhs) const

Loading…
Cancel
Save