Allow non-squared textures for toolbars and gizmo icons

This commit is contained in:
Enrico Turri 2019-02-26 10:40:00 +01:00
parent 0f683a6a1e
commit f47fe861ac
7 changed files with 86 additions and 67 deletions

View file

@ -148,8 +148,8 @@ bool GLTexture::load_from_svg_files_as_sprites_array(const std::vector<std::stri
if (filenames.empty() || (num_states == 0) || (sprite_size_px == 0))
return false;
m_width = (int)sprite_size_px * std::max((int)(num_states), (int)(filenames.size()));
m_height = m_width;
m_width = (int)(sprite_size_px * num_states);
m_height = (int)(sprite_size_px * filenames.size());
int n_pixels = m_width * m_height;
if (n_pixels <= 0)