Revert to WxWidgets 3.1.5 (#3249)

* revert to WxWidgets 3.1.5

* update nanosvg unicode path
This commit is contained in:
SoftFever 2023-12-23 17:44:09 +08:00 committed by GitHub
parent cc23ec6626
commit 374f78c768
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
95 changed files with 6841 additions and 1618 deletions

View file

@ -1368,11 +1368,12 @@ void ObjectList::extruder_editing()
if (!item || !(m_objects_model->GetItemType(item) & (itVolume | itObject)))
return;
wxRect rect = this->GetItemRect(item, GetColumn(colFilament));
wxPoint pos = rect.GetPosition();
pos.y -= 4;
wxSize size = rect.GetSize();
size.SetWidth(size.GetWidth() + 8);
const int column_width = GetColumn(colFilament)->GetWidth() + wxSystemSettings::GetMetric(wxSYS_VSCROLL_X) + 5;
wxPoint pos = this->get_mouse_position_in_control();
wxSize size = wxSize(column_width, -1);
pos.x = GetColumn(colName)->GetWidth() + GetColumn(colPrint)->GetWidth() + 5;
pos.y -= GetTextExtent("m").y;
apply_extruder_selector(&m_extruder_editor, this, "1", pos, size);
@ -3160,21 +3161,6 @@ bool ObjectList::can_merge_to_single_object() const
return (*m_objects)[obj_idx]->volumes.size() > 1;
}
wxPoint ObjectList::get_mouse_position_in_control() const
{
wxPoint pt = wxGetMousePosition() - this->GetScreenPosition();
#ifdef __APPLE__
// Workaround for OSX. From wxWidgets 3.1.6 Hittest doesn't respect to the header of wxDataViewCtrl
if (wxDataViewItem top_item = this->GetTopItem(); top_item.IsOk()) {
auto rect = this->GetItemRect(top_item, this->GetColumn(0));
pt.y -= rect.y;
}
#endif // __APPLE__
return pt;
}
bool ObjectList::can_mesh_boolean() const
{
int obj_idx = get_selected_obj_idx();
@ -5486,17 +5472,17 @@ void ObjectList::msw_rescale()
GetColumn(colSinking)->SetWidth(3 * em);
GetColumn(colEditing )->SetWidth( 3 * em);
// rescale/update existing items with bitmaps
m_objects_model->Rescale();
Layout();
}
void ObjectList::sys_color_changed()
{
wxGetApp().UpdateDVCDarkUI(this, true);
// rescale/update existing items with bitmaps
m_objects_model->UpdateBitmaps();
Layout();
msw_rescale();
if (m_objects_model) { m_objects_model->sys_color_changed(); }
}
@ -5597,15 +5583,6 @@ void ObjectList::OnEditingStarted(wxDataViewEvent &event)
SetCustomRendererPtr(dynamic_cast<wxDataViewCustomRenderer*>(renderer));
#endif
#endif //__WXMSW__
// Orca: Automatically show drop down on editing start and finish editing when the combobox is closed
// Note: this must placed AFTER the above `renderer->StartEditing` call, otherwise `c` will be nullptr on MacOS,
// due to the code in MacDarkMode.mm
if (event.GetColumn() == colFilament) {
::ComboBox*c = static_cast<::ComboBox *>(event.GetDataViewColumn()->GetRenderer()->GetEditorCtrl());
c->ToggleDropDown();
c->Bind(wxEVT_COMBOBOX_CLOSEUP, [event](wxCommandEvent& evt){ event.GetDataViewColumn()->GetRenderer()->FinishEditing(); });
}
}
void ObjectList::OnEditingDone(wxDataViewEvent &event)