Skip to content

Commit

Permalink
Remove workaround for RPTools#1976
Browse files Browse the repository at this point in the history
The workaround was needed as old overlay contents were not being erased when the page background was transparent. That
problem no longer seems to exist, so the workaround has been removed in favour of always setting a fully transparent
background. This also seems to fix the blue flicker that has plagued overlays.
  • Loading branch information
kwvanderlinde committed Aug 14, 2023
1 parent c191de7 commit 9566e2d
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ public class HTMLOverlayManager extends HTMLWebViewManager implements HTMLPanelC

/** The RGB value for a fully invisible color (alpha = 0). */
private static final int COLOR_INVISIBLE = new Color(0, 0, 0, 0).getRGB();
/** The RGB value for a nearly invisible color (alpha = 1). */
private static final int COLOR_VISIBLE = new Color(128, 128, 128, 1).getRGB();

/** The ZOrder of the overlay. */
private int zOrder;
Expand Down Expand Up @@ -131,8 +129,9 @@ void handlePage() {

@Override
public void updateContents(final String html, boolean scrollReset) {
// Sets the background to be barely visible. Workaround to fix #1976.
setPageBackgroundColor(COLOR_VISIBLE);
// If we don't set the background to invisible here, we might see a white flash for overlays
// whose content is slow to load.
setPageBackgroundColor(COLOR_INVISIBLE);
macroCallbacks.clear();
super.updateContents(html, scrollReset);
}
Expand Down

0 comments on commit 9566e2d

Please sign in to comment.