Skip to content

Commit

Permalink
sliders are aligned
Browse files Browse the repository at this point in the history
The Font slider was aligned with the Font Samples
  • Loading branch information
Tamir91 committed Jan 25, 2024
1 parent cfb3bb9 commit 53ebc1a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion common/viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 53ebc1a

Please sign in to comment.