From cb1393585e83927345bf24f31050c56f6850a76d Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Fri, 4 May 2018 10:33:04 -0400 Subject: Allow finer rotation in Viewer app. It turns out the ImGui sliders don't use the format string just for display but also to modify the potential values. Change the format string for rotation to three decimal places to match zoom. Change-Id: I5f8d675a18687d67c2f19b03aa4c19c3ae094415 Reviewed-on: https://skia-review.googlesource.com/125960 Commit-Queue: Brian Osman Auto-Submit: Ben Wagner Reviewed-by: Brian Osman --- tools/viewer/Viewer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/viewer') diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp index 7500f3ff5b..b4da7dba64 100644 --- a/tools/viewer/Viewer.cpp +++ b/tools/viewer/Viewer.cpp @@ -1467,7 +1467,7 @@ void Viewer::drawImGui() { paramsChanged = true; } float deg = fRotation; - if (ImGui::SliderFloat("Rotate", °, -30, 360, "%.0f deg")) { + if (ImGui::SliderFloat("Rotate", °, -30, 360, "%.3f deg")) { fRotation = deg; this->preTouchMatrixChanged(); paramsChanged = true; -- cgit v1.2.3