diff --git a/src/apps/webpositive/BrowserWindow.cpp b/src/apps/webpositive/BrowserWindow.cpp index 9dc7430c68..7d7d56a0b8 100644 --- a/src/apps/webpositive/BrowserWindow.cpp +++ b/src/apps/webpositive/BrowserWindow.cpp @@ -1211,9 +1211,9 @@ BrowserWindow::LoadProgress(float progress, BWebView* view) return; if (progress < 100 && fLoadingProgressBar->IsHidden()) - fLoadingProgressBar->Show(); + _ShowProgressBar(true); else if (progress == 100 && !fLoadingProgressBar->IsHidden()) - fLoadingProgressBar->Hide(); + _ShowProgressBar(false); fLoadingProgressBar->SetTo(progress); } @@ -2036,6 +2036,24 @@ BrowserWindow::_ShowInterface(bool show) } +void +BrowserWindow::_ShowProgressBar(bool show) +{ + if (show) { + if (!fStatusGroup->IsVisible() && (fVisibleInterfaceElements & INTERFACE_ELEMENT_STATUS) != 0) + fStatusGroup->SetVisible(true); + fLoadingProgressBar->Show(); + } else { + if (!fInterfaceVisible) + fStatusGroup->SetVisible(false); + // TODO: This is also used in _ShowInterface. Without it the status bar + // doesn't always hide again. It may be an Interface Kit bug. + while (!fLoadingProgressBar->IsHidden()) + fLoadingProgressBar->Hide(); + } +} + + void BrowserWindow::_InvokeButtonVisibly(BButton* button) { diff --git a/src/apps/webpositive/BrowserWindow.h b/src/apps/webpositive/BrowserWindow.h index 67ac0f5311..e9f5fe3a6f 100644 --- a/src/apps/webpositive/BrowserWindow.h +++ b/src/apps/webpositive/BrowserWindow.h @@ -187,6 +187,7 @@ private: void _SetAutoHideInterfaceInFullscreen(bool doIt); void _CheckAutoHideInterface(); void _ShowInterface(bool show); + void _ShowProgressBar(bool); void _InvokeButtonVisibly(BButton* button); BString _NewTabURL(bool isNewWindow) const;