mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 02:52:10 +00:00
Support larger printer sizes by using 64-bit.
SuperSlicer is referenced for some changes. Co-authored-by: Merill <merill@free.fr>
This commit is contained in:
@@ -264,7 +264,7 @@ struct GuiCfg
|
||||
float max_tooltip_width = 0.f;
|
||||
|
||||
// maximal width and height of style image
|
||||
Vec2i max_style_image_size = Vec2i(0, 0);
|
||||
Vec2i32 max_style_image_size = Vec2i32(0, 0);
|
||||
|
||||
float indent = 0.f;
|
||||
float input_offset = 0.f;
|
||||
@@ -274,7 +274,7 @@ struct GuiCfg
|
||||
ImVec2 text_size;
|
||||
|
||||
// maximal size of face name image
|
||||
Vec2i face_name_size = Vec2i(0, 0);
|
||||
Vec2i32 face_name_size = Vec2i32(0, 0);
|
||||
float face_name_texture_offset_x = 0.f;
|
||||
|
||||
// maximal texture generate jobs running at once
|
||||
@@ -1567,7 +1567,7 @@ void GLGizmoEmboss::init_font_name_texture() {
|
||||
glsafe(::glBindTexture(target, id));
|
||||
glsafe(::glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST));
|
||||
glsafe(::glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST));
|
||||
const Vec2i &size = m_gui_cfg->face_name_size;
|
||||
const Vec2i32 &size = m_gui_cfg->face_name_size;
|
||||
GLint w = size.x(), h = m_face_names->count_cached_textures * size.y();
|
||||
std::vector<unsigned char> data(4*w * h, {0});
|
||||
const GLenum format = GL_RGBA, type = GL_UNSIGNED_BYTE;
|
||||
@@ -3698,8 +3698,8 @@ GuiCfg create_gui_configuration()
|
||||
|
||||
int max_style_image_width = static_cast<int>(std::round(cfg.max_style_name_width/2 - 2 * style.FramePadding.x));
|
||||
int max_style_image_height = static_cast<int>(std::round(input_height));
|
||||
cfg.max_style_image_size = Vec2i(max_style_image_width, line_height);
|
||||
cfg.face_name_size = Vec2i(cfg.input_width, line_height_with_spacing);
|
||||
cfg.max_style_image_size = Vec2i32(max_style_image_width, line_height);
|
||||
cfg.face_name_size = Vec2i32(cfg.input_width, line_height_with_spacing);
|
||||
cfg.face_name_texture_offset_x = cfg.face_name_size.x() + space;
|
||||
|
||||
cfg.max_tooltip_width = ImGui::GetFontSize() * 20.0f;
|
||||
|
||||
Reference in New Issue
Block a user