From 681ac5f777ce91952e5c02e33b51c5d8e6f15336 Mon Sep 17 00:00:00 2001 From: ocornut Date: Tue, 26 Aug 2014 16:56:20 +0100 Subject: [PATCH] Fixed size/padding of slider grab box for vertical symetry (was 1 pixel too high) --- imgui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui.cpp b/imgui.cpp index 564da42a5..1e805f7b1 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -3284,7 +3284,7 @@ bool SliderFloat(const char* label, float* v, float v_min, float v_max, const ch // Draw const float grab_x = ImLerp(slider_effective_x1, slider_effective_x2, grab_t); - const ImGuiAabb grab_bb(ImVec2(grab_x-grab_size_in_pixels*0.5f,frame_bb.Min.y+2.0f), ImVec2(grab_x+grab_size_in_pixels*0.5f,frame_bb.Max.y-1.0f)); + const ImGuiAabb grab_bb(ImVec2(grab_x-grab_size_in_pixels*0.5f,frame_bb.Min.y+2.0f), ImVec2(grab_x+grab_size_in_pixels*0.5f,frame_bb.Max.y-2.0f)); window->DrawList->AddRectFilled(grab_bb.Min, grab_bb.Max, window->Color(g.ActiveId == id ? ImGuiCol_SliderGrabActive : ImGuiCol_SliderGrab)); }