mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-08-06 06:12:56 +08:00
refactor: use PyQT5 for window display (#49)
* wip: use PyQT5 for window display * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * wip: first slide is shown * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * wip: pushing non-working code * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * wip: some logging * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: new configuration wizard working * fix: prevent key error * wip: making action work * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * wip: soon done! info + video * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix: bugs in sleep and exiting * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * try: offscreen * fix: pop default value if not present * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * feat: add aspect ratio option * chore: typing wip * fix: now() function returns seconds, not milliseconds anymore Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -1,32 +1,2 @@
|
||||
import platform
|
||||
from typing import Tuple
|
||||
|
||||
import cv2
|
||||
|
||||
__all__ = [
|
||||
"FONT_ARGS",
|
||||
"FOLDER_PATH",
|
||||
"CONFIG_PATH",
|
||||
"RIGHT_ARROW_KEY_CODE",
|
||||
"LEFT_ARROW_KEY_CODE",
|
||||
]
|
||||
|
||||
FONT_ARGS: Tuple[int, int, int, int, int] = (
|
||||
cv2.FONT_HERSHEY_SIMPLEX, # type: ignore
|
||||
1,
|
||||
255,
|
||||
1,
|
||||
cv2.LINE_AA, # type: ignore
|
||||
)
|
||||
FOLDER_PATH: str = "./slides"
|
||||
CONFIG_PATH: str = ".manim-slides.json"
|
||||
|
||||
if platform.system() == "Windows":
|
||||
RIGHT_ARROW_KEY_CODE: int = 2555904
|
||||
LEFT_ARROW_KEY_CODE: int = 2424832
|
||||
elif platform.system() == "Darwin":
|
||||
RIGHT_ARROW_KEY_CODE = 63235
|
||||
LEFT_ARROW_KEY_CODE = 63234
|
||||
else:
|
||||
RIGHT_ARROW_KEY_CODE = 65363
|
||||
LEFT_ARROW_KEY_CODE = 65361
|
||||
|
Reference in New Issue
Block a user