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

@ -248,14 +248,47 @@ void ObjectLayers::UpdateAndShow(const bool show)
void ObjectLayers::msw_rescale()
{
//Orca: deleted what PS commented out
m_bmp_delete.msw_rescale();
m_bmp_add.msw_rescale();
m_grid_sizer->SetHGap(wxGetApp().em_unit());
// rescale edit-boxes
const int cells_cnt = m_grid_sizer->GetCols() * m_grid_sizer->GetEffectiveRowsCount();
for (int i = 0; i < cells_cnt; ++i) {
const wxSizerItem* item = m_grid_sizer->GetItem(i);
if (item->IsWindow()) {
LayerRangeEditor* editor = dynamic_cast<LayerRangeEditor*>(item->GetWindow());
if (editor != nullptr)
editor->msw_rescale();
}
else if (item->IsSizer()) // case when we have editor with buttons
{
wxSizerItem* e_item = item->GetSizer()->GetItem(size_t(0)); // editor
if (e_item->IsWindow()) {
LayerRangeEditor* editor = dynamic_cast<LayerRangeEditor*>(e_item->GetWindow());
if (editor != nullptr)
editor->msw_rescale();
}
if (item->GetSizer()->GetItemCount() > 2) // if there are Add/Del buttons
for (size_t btn : {2, 3}) { // del_btn, add_btn
wxSizerItem* b_item = item->GetSizer()->GetItem(btn);
if (b_item->IsWindow()) {
auto button = dynamic_cast<PlusMinusButton*>(b_item->GetWindow());
if (button != nullptr)
button->msw_rescale();
}
}
}
}
m_grid_sizer->Layout();
}
void ObjectLayers::sys_color_changed()
{
m_bmp_delete.sys_color_changed();
m_bmp_add.sys_color_changed();
m_bmp_delete.msw_rescale();
m_bmp_add.msw_rescale();
// rescale edit-boxes
const int cells_cnt = m_grid_sizer->GetCols() * m_grid_sizer->GetEffectiveRowsCount();
@ -267,7 +300,7 @@ void ObjectLayers::sys_color_changed()
if (b_item && b_item->IsWindow()) {
auto button = dynamic_cast<PlusMinusButton*>(b_item->GetWindow());
if (button != nullptr)
button->sys_color_changed();
button->msw_rescale();
}
}
}