Skip to content

Commit fa1d6ea

Browse files
iamllamadae
authored andcommitted
Fix flashing when opening the stats, empty cards or find dupes dialogs (#3928)
* add AnkiWebView subclasses for stats, empty cards and find dupes ui * update ui files to use subclassed webviews instead * remove superfluous calls to AnkiWebView.set_kind * revert impl * set page background colour after setPage in AnkiWebView.set_kind (cherry picked from commit a74fd74)
1 parent 234fa0c commit fa1d6ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

qt/aqt/webview.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ def set_kind(self, kind: AnkiWebViewKind) -> None:
399399
# signal from the first one is received
400400
if kind != AnkiWebViewKind.DEFAULT:
401401
self.setPage(AnkiWebPage(self._onBridgeCmd, kind, self))
402+
self.page().setBackgroundColor(theme_manager.qcolor(colors.CANVAS))
402403

403404
def page(self) -> AnkiWebPage:
404405
return cast(AnkiWebPage, super().page())

0 commit comments

Comments
 (0)