mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Add API shim for webview.get_window_bg_color (#2095)
* Maintain shim for webview.get_window_bg_color Used by the AMBOSS add-on * Fix deprecation message
This commit is contained in:
parent
ccb18ec709
commit
da4d80da2a
1 changed files with 5 additions and 0 deletions
|
@ -9,6 +9,7 @@ from typing import Any, Callable, Optional, Sequence, cast
|
||||||
|
|
||||||
import anki
|
import anki
|
||||||
import anki.lang
|
import anki.lang
|
||||||
|
from anki._legacy import deprecated
|
||||||
from anki.lang import is_rtl
|
from anki.lang import is_rtl
|
||||||
from anki.utils import is_lin, is_mac, is_win
|
from anki.utils import is_lin, is_mac, is_win
|
||||||
from aqt import colors, gui_hooks
|
from aqt import colors, gui_hooks
|
||||||
|
@ -715,3 +716,7 @@ html {{ {font} }}
|
||||||
}})();
|
}})();
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@deprecated(info="use theme_manager.qcolor() instead")
|
||||||
|
def get_window_bg_color(self, night_mode: Optional[bool] = None) -> QColor:
|
||||||
|
return theme_manager.qcolor(colors.CANVAS)
|
||||||
|
|
Loading…
Reference in a new issue