mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 11:37:45 +00:00
Change window position defaults
This commit is contained in:
parent
c65dfb85d2
commit
bbfce0f5be
3 changed files with 11 additions and 8 deletions
|
|
@ -232,8 +232,8 @@ def get_configuration(args):
|
|||
config["camera_config"] = get_camera_configuration(args)
|
||||
config["window_config"] = {
|
||||
"size": (
|
||||
config["camera_config"]["pixel_width"],
|
||||
config["camera_config"]["pixel_height"],
|
||||
manimlib.constants.DEFAULT_WINDOW_WIDTH,
|
||||
manimlib.constants.DEFAULT_WINDOW_HEIGHT,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,6 +153,10 @@ DEFAULT_PIXEL_HEIGHT = PRODUCTION_QUALITY_CAMERA_CONFIG["pixel_height"]
|
|||
DEFAULT_PIXEL_WIDTH = PRODUCTION_QUALITY_CAMERA_CONFIG["pixel_width"]
|
||||
DEFAULT_FRAME_RATE = 60
|
||||
|
||||
DEFAULT_WINDOW_WIDTH = 896
|
||||
DEFAULT_WINDOW_HEIGHT = 504
|
||||
DEFAULT_WINDOW_POSITION = (897, 0)
|
||||
|
||||
DEFAULT_STROKE_WIDTH = 4
|
||||
|
||||
FRAME_HEIGHT = 8.0
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@ import moderngl_window as mglw
|
|||
from moderngl_window.context.pyglet.window import Window as PygletWindow
|
||||
from moderngl_window.timers.clock import Timer
|
||||
|
||||
from manimlib.constants import DEFAULT_PIXEL_WIDTH
|
||||
from manimlib.constants import DEFAULT_PIXEL_HEIGHT
|
||||
from manimlib.constants import DEFAULT_WINDOW_WIDTH
|
||||
from manimlib.constants import DEFAULT_WINDOW_HEIGHT
|
||||
from manimlib.constants import DEFAULT_WINDOW_POSITION
|
||||
from manimlib.utils.config_ops import digest_config
|
||||
|
||||
|
||||
class Window(PygletWindow):
|
||||
size = (DEFAULT_PIXEL_WIDTH, DEFAULT_PIXEL_HEIGHT)
|
||||
size = (DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT)
|
||||
fullscreen = False
|
||||
resizable = True
|
||||
gl_version = (3, 3)
|
||||
|
|
@ -21,9 +22,7 @@ class Window(PygletWindow):
|
|||
super().__init__(**kwargs)
|
||||
self.scene = scene
|
||||
self.title = str(scene)
|
||||
# Put at the top of the screen
|
||||
# self.position = (self.position[0], 0)
|
||||
self.position = (512, 0)
|
||||
self.position = DEFAULT_WINDOW_POSITION
|
||||
|
||||
mglw.activate_context(window=self)
|
||||
self.timer = Timer()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue