FIX:fixed crashed when starting Studio on secondary display
Change-Id: I0392607479a25b5e2b2704f5569d6b8b94ba7e3d
This commit is contained in:
parent
3fb942077c
commit
0ed1d2ed34
|
@ -5906,8 +5906,16 @@ 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
|
||||
if (new_h_scale <= 0) {
|
||||
new_h_scale = 1;
|
||||
}
|
||||
|
||||
//use the same value as horizon
|
||||
float new_v_scale = new_h_scale;
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue