mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Have window default to half monitor width instead of half height
This commit is contained in:
parent
69bb4f026c
commit
0c75d79080
1 changed files with 3 additions and 3 deletions
|
@ -394,10 +394,10 @@ def get_configuration(args):
|
|||
mon_index = custom_config["window_monitor"]
|
||||
monitor = monitors[min(mon_index, len(monitors) - 1)]
|
||||
aspect_ratio = config["camera_config"]["pixel_width"] / config["camera_config"]["pixel_height"]
|
||||
window_height = monitor.height
|
||||
window_width = monitor.width
|
||||
if not (args.full_screen or custom_config["full_screen"]):
|
||||
window_height //= 2
|
||||
window_width = int(window_height * aspect_ratio)
|
||||
window_width //= 2
|
||||
window_height = int(window_width / aspect_ratio)
|
||||
config["window_config"] = {
|
||||
"size": (window_width, window_height),
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue