mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 01:07:57 -06:00
Reworked sys_color_changed() functions
Fixed OSX specific bugs: - toolbar flashing for some mainframe sizes (Retina specific) - size of mainframe when settings layout in slNew mode Added missed icons to the "white" folder
This commit is contained in:
parent
c09d702045
commit
a56bbea140
17 changed files with 135 additions and 11 deletions
|
@ -272,6 +272,33 @@ void ObjectLayers::msw_rescale()
|
|||
m_grid_sizer->Layout();
|
||||
}
|
||||
|
||||
void ObjectLayers::sys_color_changed()
|
||||
{
|
||||
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->IsSizer()) {// case when we have editor with buttons
|
||||
const std::vector<size_t> btns = {2, 3}; // del_btn, add_btn
|
||||
for (auto btn : btns) {
|
||||
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::reset_selection()
|
||||
{
|
||||
m_selectable_range = { 0.0, 0.0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue