[gantt] pad sub-op ID width

This commit is contained in:
Tim Stack 2023-08-23 09:44:09 -07:00
parent 880d31ea0a
commit 921bc0a3d3
2 changed files with 11 additions and 1 deletions

View File

@ -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) {

View File

@ -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