aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer/Viewer.cpp
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-06-29 14:30:48 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-29 18:58:57 +0000
commit7197e05eae34dce1c65c56a92b75b29b645d0d5d (patch)
treec51df7e7cc29d93e8e9c89491ea51887213f104b /tools/viewer/Viewer.cpp
parent0c3ceb2a1438662906de17f46a7e2344b91c1fba (diff)
Update ImGui to v1.62 (June 22, 2018)
He's been steadily adding features and fixing bugs, figured it was time to fetch a new version. Change-Id: I496aefc0a1b60c3be5c89a0e58dc64811fccc77e Reviewed-on: https://skia-review.googlesource.com/138591 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'tools/viewer/Viewer.cpp')
-rw-r--r--tools/viewer/Viewer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 3675cc4fe2..81c1851783 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -1418,13 +1418,13 @@ static bool ImGui_DragQuad(SkPoint* pts) {
void Viewer::drawImGui() {
// Support drawing the ImGui demo window. Superfluous, but gives a good idea of what's possible
if (fShowImGuiTestWindow) {
- ImGui::ShowTestWindow(&fShowImGuiTestWindow);
+ ImGui::ShowDemoWindow(&fShowImGuiTestWindow);
}
if (fShowImGuiDebugWindow) {
// We have some dynamic content that sizes to fill available size. If the scroll bar isn't
// always visible, we can end up in a layout feedback loop.
- ImGui::SetNextWindowSize(ImVec2(400, 400), ImGuiSetCond_FirstUseEver);
+ ImGui::SetNextWindowSize(ImVec2(400, 400), ImGuiCond_FirstUseEver);
DisplayParams params = fWindow->getRequestedDisplayParams();
bool paramsChanged = false;
if (ImGui::Begin("Tools", &fShowImGuiDebugWindow,
@@ -1827,7 +1827,8 @@ void Viewer::drawImGui() {
}
if (fShowZoomWindow && fLastImage) {
- if (ImGui::Begin("Zoom", &fShowZoomWindow, ImVec2(200, 200))) {
+ ImGui::SetNextWindowSize(ImVec2(200, 200), ImGuiCond_FirstUseEver);
+ if (ImGui::Begin("Zoom", &fShowZoomWindow)) {
static int zoomFactor = 8;
if (ImGui::Button("<<")) {
zoomFactor = SkTMax(zoomFactor / 2, 4);