mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-15 07:32:39 -07:00
Added _fiction_ resizing for correct MainFrame rendering after DPI changed_object
+ Added a calculation of a empty bitmaps inside presets in respect to em_unit (to avoid assert) + Added scaling for PrintHostDialogs and MsgDialog + some code refactoring
This commit is contained in:
@@ -258,12 +258,6 @@ bool MainFrame::can_delete_all() const
|
||||
|
||||
void MainFrame::on_dpi_changed(const wxRect &suggested_rect)
|
||||
{
|
||||
// const float old_sc_factor = prev_scale_factor();
|
||||
// const float new_sc_factor = scale_factor();
|
||||
//
|
||||
// printf("old_sc_factor: %.2f \n", old_sc_factor);
|
||||
// printf("new_sc_factor: %.2f\n\n", new_sc_factor);
|
||||
|
||||
wxGetApp().update_fonts();
|
||||
|
||||
// _strange_ workaround for correct em_unit calculation
|
||||
@@ -281,6 +275,13 @@ void MainFrame::on_dpi_changed(const wxRect &suggested_rect)
|
||||
// update Tabs
|
||||
for (auto tab : wxGetApp().tabs_list)
|
||||
tab->rescale();
|
||||
|
||||
/* To correct window rendering (especially redraw of a status bar)
|
||||
* we should imitate window resizing.
|
||||
*/
|
||||
const wxSize& sz = this->GetSize();
|
||||
this->SetSize(sz.x + 1, sz.y + 1);
|
||||
this->SetSize(sz);
|
||||
}
|
||||
|
||||
void MainFrame::init_menubar()
|
||||
|
||||
Reference in New Issue
Block a user