From 53ebc1aed384be3e81b9a7e7a3f10c00c81bab6c Mon Sep 17 00:00:00 2001 From: Tamir Date: Thu, 25 Jan 2024 15:43:37 +0200 Subject: [PATCH] sliders are aligned The Font slider was aligned with the Font Samples --- common/viewer.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/common/viewer.cpp b/common/viewer.cpp index 87e41f9ea76..d5ff1dd1eb3 100644 --- a/common/viewer.cpp +++ b/common/viewer.cpp @@ -2493,8 +2493,11 @@ namespace rs2 ImGui::Text("Font Samples: "); if (ImGui::IsItemHovered()) ImGui::SetTooltip("Increased font samples produce nicer text, but require more GPU memory, sometimes resulting in boxes instead of font characters"); + ImGui::SameLine(); ImGui::PushItemWidth(80); + float slider_position_x = ImGui::GetCursorPosX(); + if (ImGui::SliderInt("##font_samples", &font_samples, 1, 8)) { reload_required = true; @@ -2507,8 +2510,11 @@ namespace rs2 ImGui::Text( "Font Size: " ); if( ImGui::IsItemHovered() ) ImGui::SetTooltip( "Viewer Font Size" ); + ImGui::SameLine(); - ImGui::PushItemWidth( 109 ); + ImGui::PushItemWidth( 80 ); + ImGui::SetCursorPosX( slider_position_x ); + if( ImGui::SliderInt( "##font_size", &font_size, 16, 20 ) ) { reload_required = true;