ENH:modify "return" bar pos and Text

jira: none
Change-Id: I541c0006ffd8d2e8c815c5316c8cc858266da580
(cherry picked from commit bfdf139a41c551c4a62271f8bb34dd0447e68c8d)
This commit is contained in:
zhou.xu 2024-05-10 16:58:41 +08:00 committed by Lane.Wei
parent 124bedf545
commit b035115b06
2 changed files with 11 additions and 2 deletions

View File

@ -7990,7 +7990,16 @@ void GLCanvas3D::_render_return_toolbar()
float window_height = button_icon_size.y + imgui.scaled(2.0f);
float window_pos_x = 30.0f;
float window_pos_y = 14.0f;
{//solve ui overlap issue
float zoom = (float) wxGetApp().plater()->get_camera().get_zoom();
float left_pos = m_main_toolbar.get_item("add")->render_left_pos;
const float toolbar_x = 0.5 * canvas_w + left_pos * zoom;
const float margin = 5;
if (toolbar_x < window_width + margin * 3) {
window_pos_x = 5.0f;
window_pos_y = m_main_toolbar.get_height() + 2.0f;
}
}
imgui.set_next_window_pos(window_pos_x, window_pos_y, ImGuiCond_Always, 0, 0);
#ifdef __WINDOWS__
imgui.set_next_window_size(window_width, window_height, ImGuiCond_Always);

View File

@ -715,7 +715,7 @@ void GLGizmoMmuSegmentation::on_render_input_window(float x, float y, float bott
ImGui::PushItemWidth(1.5 * slider_icon_width);
ImGui::BBLDragFloat("##cursor_height_input", &m_cursor_height, 0.05f, 0.0f, 0.0f, "%.2f");
m_imgui->bbl_checkbox(_L("Lock x value of bottom"), m_lock_x_for_height_bottom);
m_imgui->bbl_checkbox(_L("Place input box of bottom near mouse"), m_lock_x_for_height_bottom);
ImGui::Separator();
if (m_c->object_clipper()->get_position() == 0.f) {
ImGui::AlignTextToFramePadding();