plates-toolbar-scrollbar-size

This commit is contained in:
yw4z
2026-08-02 14:43:30 +03:00
parent f9fa1c117f
commit 2396d712c1
+2 -2
View File
@@ -8929,7 +8929,7 @@ void GLCanvas3D::_render_imgui_select_plate_toolbar()
int item_count = m_sel_plate_toolbar.m_items.size() + (m_sel_plate_toolbar.show_stats_item ? 1 : 0);
float window_height_calc = (item_count * (button_height + (margin_size + button_margin) * 2.0f) + (item_count - 1) * ImGui::GetStyle().ItemSpacing.y + ImGui::GetStyle().WindowPadding.y * 2.0f);
bool show_scroll = m_sel_plate_toolbar.is_display_scrollbar && (window_height_calc > window_height_max);
float scrollbar_size = 10.0f * f_scale ;
float scrollbar_size = 14.0f * f_scale;
float window_height = std::min(window_height_calc, window_height_max);
float window_width = button_width + (margin_size + button_margin + ImGui::GetStyle().WindowPadding.x) * 2 + (show_scroll ? scrollbar_size : 0);
@@ -8955,7 +8955,7 @@ void GLCanvas3D::_render_imgui_select_plate_toolbar()
ImGui::PushStyleVar(ImGuiStyleVar_ScrollbarSize, scrollbar_size);
ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, show_scroll ? (4.0f * f_scale) : (button_radius + margin_size + frame_padding + ImGui::GetStyle().WindowPadding.x));
ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, show_scroll ? (6.f * f_scale) : (button_radius + margin_size + frame_padding + ImGui::GetStyle().WindowPadding.x));
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, button_radius + margin_size);
imgui.set_next_window_pos(canvas_w * 0 + 5.0f * f_scale, canvas_h * 0 + y_offset, ImGuiCond_Always, 0, 0); // ORCA Add slight gap on left edge so toolbar looks like floating and it creates separation with sidebar