ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE set as default

This commit is contained in:
Enrico Turri 2020-01-17 10:34:32 +01:00
parent 67655743b9
commit dad09c737c
8 changed files with 4 additions and 29 deletions

View file

@ -276,12 +276,12 @@ bool GLTexture::load_from_svg_files_as_sprites_array(const std::vector<std::stri
#if ENABLE_MODIFIED_TOOLBAR_TEXTURES
float inv_255 = 1.0f / 255.0f;
// offset by 1 to leave the first pixel empty (both in x and y)
for (int r = 1; r <= sprite_size_px; ++r)
for (unsigned int r = 1; r <= sprite_size_px; ++r)
{
int offset_r = r * sprite_size_px_ex;
for (int c = 1; c <= sprite_size_px; ++c)
unsigned int offset_r = r * sprite_size_px_ex;
for (unsigned int c = 1; c <= sprite_size_px; ++c)
{
int offset = (offset_r + c) * 4;
unsigned int offset = (offset_r + c) * 4;
float alpha = (float)output_data.data()[offset + 3] * inv_255;
output_data.data()[offset + 0] = (unsigned char)(output_data.data()[offset + 0] * alpha);
output_data.data()[offset + 1] = (unsigned char)(output_data.data()[offset + 1] * alpha);