Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Commit

Permalink
Fixed stop navigation button tooltip (#1480)
Browse files Browse the repository at this point in the history
* Fixed stop navigation button tooltip

* Refresh tooltip button if text is updated
  • Loading branch information
keianhzo authored and bluemarvin committed Aug 1, 2019
1 parent 6c48e63 commit 3d484cb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ public void setTooltip(String text) {
mTooltipText = text;
else
setTooltipText(text);

if (mTooltipView != null && mTooltipView.isVisible())
mTooltipView.setText(text);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,7 @@ public void onPageStart(GeckoSession aSession, String aUri) {
mURLBar.setIsLoading(true);
if (mReloadButton != null) {
mReloadButton.setImageResource(R.drawable.ic_icon_exit);
mReloadButton.setTooltip(getResources().getString(R.string.stop_tooltip));
}
}

Expand All @@ -715,6 +716,7 @@ public void onPageStop(GeckoSession aSession, boolean b) {
mURLBar.setIsLoading(false);
if (mReloadButton != null) {
mReloadButton.setImageResource(R.drawable.ic_icon_reload);
mReloadButton.setTooltip(getResources().getString(R.string.refresh_tooltip));
}
}

Expand Down
4 changes: 4 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,10 @@
'Refresh' refers to reloading the current page. -->
<string name="refresh_tooltip">Refresh</string>

<!-- This string is for the tooltip that appears upon hovering the 'Stop' button in the browser's navigation bar.
'Stop' stops the current page load. -->
<string name="stop_tooltip">Stop Loading</string>

<!-- This string is for the tooltip that appears upon hovering the 'Home' button in the browser's navigation bar.
'Home' refers to the browser's start page (e.g., the Firefox Reality Home Page). -->
<string name="home_tooltip">Home</string>
Expand Down

0 comments on commit 3d484cb

Please sign in to comment.