FIX: long filament name display with ellipsis

Jira: [STUDIO-6754]
Change-Id: I7de774bba953c85b21d39113a5decddd2439fafd
(cherry picked from commit a157d0e26209b12a2bf0544b066866c3df8e50e0)
This commit is contained in:
hemai
2025-07-23 11:26:17 +08:00
committed by Noisyfox
parent c297c4232f
commit 070a8e62a1

View File

@@ -1557,6 +1557,9 @@ void MappingItem::render(wxDC &dc)
top += txt_size.y + FromDIP(2);
m_name.size() > 4 ? dc.SetFont(::Label::Body_9) : dc.SetFont(::Label::Body_12);
if(m_name.size() > 5){
m_name = m_name.substr(0,5) + "...";
}
txt_size = dc.GetTextExtent(m_name);
dc.DrawText(m_name, wxPoint((GetSize().x - txt_size.x) / 2, top));
}