aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2018-05-04 10:33:04 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-04 19:09:08 +0000
commitcb1393585e83927345bf24f31050c56f6850a76d (patch)
tree2c51646765dfb0f5031e10748e3677925c097df5 /tools/viewer
parentd4e735aa8f595fd7357b0cfc54eba6216ef1c75f (diff)
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 <brianosman@google.com> Auto-Submit: Ben Wagner <bungeman@google.com> Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tools/viewer')
-rw-r--r--tools/viewer/Viewer.cpp2
1 files changed, 1 insertions, 1 deletions
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", &deg, -30, 360, "%.0f deg")) {
+ if (ImGui::SliderFloat("Rotate", &deg, -30, 360, "%.3f deg")) {
fRotation = deg;
this->preTouchMatrixChanged();
paramsChanged = true;