mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-31 16:11:58 +08:00
Fix for #11642: File names in gallery view are cut
Note: This issue was from the very beginning. Previously bold font was used for list item as a marker for "system" shapes. But a bold font has no visual effect on MSW and cause a wrong rendering on other platforms. So, we use item data to set a "system" marker
This commit is contained in:
parent
aec372fde5
commit
a2527be1d6
@ -417,8 +417,7 @@ void GalleryDialog::load_label_icon_list()
|
||||
int img_cnt = m_image_list->GetImageCount();
|
||||
for (int i = 0; i < img_cnt; i++) {
|
||||
m_list_ctrl->InsertItem(i, from_u8(list_items[i].name), i);
|
||||
if (list_items[i].is_system)
|
||||
m_list_ctrl->SetItemFont(i, wxGetApp().bold_font());
|
||||
m_list_ctrl->SetItemData(i, list_items[i].is_system ? 1 : 0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -517,7 +516,7 @@ void GalleryDialog::change_thumbnail()
|
||||
void GalleryDialog::select(wxListEvent& event)
|
||||
{
|
||||
int idx = event.GetIndex();
|
||||
Item item { into_u8(m_list_ctrl->GetItemText(idx)), m_list_ctrl->GetItemFont(idx).GetWeight() == wxFONTWEIGHT_BOLD };
|
||||
Item item { into_u8(m_list_ctrl->GetItemText(idx)), m_list_ctrl->GetItemData(idx) == static_cast<wxUIntPtr>(1)};
|
||||
|
||||
m_selected_items.push_back(item);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user