mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-17 02:22:17 +00:00
FIX: long filament name display with ellipsis
Jira: [STUDIO-6754] Change-Id: I7de774bba953c85b21d39113a5decddd2439fafd (cherry picked from commit a157d0e26209b12a2bf0544b066866c3df8e50e0)
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user