Skip to content

Commit

Permalink
Fix toolbar rendering on Windows (#2784)
Browse files Browse the repository at this point in the history
Currently on windows, when you resize the window relatively small, the
end of the toolbar will be clipped like so:

![d95d24afdc47eef04df4a2c755d13494](https://github.com/SoftFever/OrcaSlicer/assets/1537155/5f060966-3613-4bd7-8036-e9b27c12ffd3)

This is what it look like on Linux/macOS:

![image](https://github.com/SoftFever/OrcaSlicer/assets/1537155/167ab075-1c48-4531-a2ef-3f225874cfbd)

This PR fixes this issue so it behaves like on Linux/macOS:

![60cb540f198c5d680fceaa387302c475](https://github.com/SoftFever/OrcaSlicer/assets/1537155/7e1b404b-bdf7-4c3b-bee7-5d2f0a11f91e)
  • Loading branch information
SoftFever authored Nov 19, 2023
2 parents 93f62a4 + a590d4c commit 5c64a05
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/slic3r/GUI/GLCanvas3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7152,9 +7152,6 @@ void GLCanvas3D::_check_and_update_toolbar_icon_scale()
float noitems_width = top_tb_width - size * items_cnt; // width of separators and borders in top toolbars

// calculate scale needed for items in all top toolbars
#ifdef __WINDOWS__
cnv_size.set_width(cnv_size.get_width() + m_separator_toolbar.get_width() + collapse_toolbar_width);
#endif
float new_h_scale = (cnv_size.get_width() - noitems_width) / (items_cnt * GLToolbar::Default_Icons_Size);

//for protect
Expand Down

0 comments on commit 5c64a05

Please sign in to comment.