mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-09-26 08:43:15 +08:00
Align font preview to left. (closer to font name)
This commit is contained in:
parent
b67c4785f0
commit
eb9b8c0c2b
@ -3705,7 +3705,7 @@ GuiCfg create_gui_configuration()
|
|||||||
int max_style_image_height = static_cast<int>(std::round(1.5 * input_height));
|
int max_style_image_height = static_cast<int>(std::round(1.5 * input_height));
|
||||||
cfg.max_style_image_size = Vec2i(max_style_image_width, max_style_image_height);
|
cfg.max_style_image_size = Vec2i(max_style_image_width, max_style_image_height);
|
||||||
cfg.face_name_size = Vec2i(cfg.input_width, line_height_with_spacing);
|
cfg.face_name_size = Vec2i(cfg.input_width, line_height_with_spacing);
|
||||||
cfg.face_name_texture_offset_x = cfg.face_name_size.x() + space;
|
cfg.face_name_texture_offset_x = cfg.face_name_size.x() + style.WindowPadding.x + space;
|
||||||
return cfg;
|
return cfg;
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -146,8 +146,9 @@ void CreateFontImageJob::finalize(bool canceled, std::exception_ptr &)
|
|||||||
glsafe(::glBindTexture(target, m_input.texture_id));
|
glsafe(::glBindTexture(target, m_input.texture_id));
|
||||||
|
|
||||||
GLsizei w = m_tex_size.x(), h = m_tex_size.y();
|
GLsizei w = m_tex_size.x(), h = m_tex_size.y();
|
||||||
GLint xoffset = m_input.size.x() - m_tex_size.x(), // arrange right
|
GLint xoffset = 0; // align to left
|
||||||
yoffset = m_input.size.y() * m_input.index;
|
// GLint xoffset = m_input.size.x() - m_tex_size.x(); // align right
|
||||||
|
GLint yoffset = m_input.size.y() * m_input.index;
|
||||||
glsafe(::glTexSubImage2D(target, m_input.level, xoffset, yoffset, w, h,
|
glsafe(::glTexSubImage2D(target, m_input.level, xoffset, yoffset, w, h,
|
||||||
m_input.format, m_input.type, m_result.data()));
|
m_input.format, m_input.type, m_result.data()));
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user