From 50929d7992692364f9c9bcdf60ce75a240c3b60c Mon Sep 17 00:00:00 2001 From: Paul Rouget Date: Tue, 29 Oct 2019 08:25:50 +0100 Subject: [PATCH] Add a loading indicator in transient mode --- support/hololens/ServoApp/BrowserPage.cpp | 9 +++++++-- support/hololens/ServoApp/BrowserPage.xaml | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/support/hololens/ServoApp/BrowserPage.cpp b/support/hololens/ServoApp/BrowserPage.cpp index 558b403a43d..61341dfcc29 100644 --- a/support/hololens/ServoApp/BrowserPage.cpp +++ b/support/hololens/ServoApp/BrowserPage.cpp @@ -28,14 +28,17 @@ void BrowserPage::BindServoEvents() { forwardButton().IsEnabled(forward); }); servoControl().OnLoadStarted([=] { - throbber().IsActive(true); + urlbarLoadingIndicator().IsActive(true); + transientLoadingIndicator().IsIndeterminate(true); + reloadButton().IsEnabled(false); reloadButton().Visibility(Visibility::Collapsed); stopButton().IsEnabled(true); stopButton().Visibility(Visibility::Visible); }); servoControl().OnLoadEnded([=] { - throbber().IsActive(false); + urlbarLoadingIndicator().IsActive(false); + transientLoadingIndicator().IsIndeterminate(false); reloadButton().IsEnabled(true); reloadButton().Visibility(Visibility::Visible); stopButton().IsEnabled(false); @@ -65,6 +68,8 @@ void BrowserPage::SetTransientMode(bool transient) { servoControl().SetTransientMode(transient); navigationBar().Visibility(transient ? Visibility::Collapsed : Visibility::Visible); + transientLoadingIndicator().Visibility(transient ? Visibility::Visible + : Visibility::Collapsed); } void BrowserPage::SetArgs(hstring args) { servoControl().SetArgs(args); } diff --git a/support/hololens/ServoApp/BrowserPage.xaml b/support/hololens/ServoApp/BrowserPage.xaml index 5255b3a4ab5..386a20accac 100644 --- a/support/hololens/ServoApp/BrowserPage.xaml +++ b/support/hololens/ServoApp/BrowserPage.xaml @@ -83,6 +83,7 @@ + @@ -105,8 +106,9 @@ - + +