Merge pull request #627 from evandroforks/add_missing_anki_icon_to_preview_window

Added missing Anki icon to qt/aqt/previewer.py
This commit is contained in:
Damien Elmes 2020-05-20 12:47:33 +10:00 committed by GitHub
commit 000930f3c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,8 @@ import re
import time import time
from typing import Any, Callable, List, Optional, Union from typing import Any, Callable, List, Optional, Union
from PyQt5 import QtGui
from anki.cards import Card from anki.cards import Card
from anki.lang import _ from anki.lang import _
from aqt import AnkiQt, gui_hooks from aqt import AnkiQt, gui_hooks
@ -41,6 +43,11 @@ class Previewer(QDialog):
self._parent = parent self._parent = parent
self._close_callback = on_close self._close_callback = on_close
self.mw = mw self.mw = mw
icon = QtGui.QIcon()
icon.addPixmap(
QtGui.QPixmap(":/icons/anki.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off
)
self.setWindowIcon(icon)
def card(self) -> Optional[Card]: def card(self) -> Optional[Card]:
raise NotImplementedError raise NotImplementedError