From a46b7d6931d89b920cab291530bc4fc2c6a3bb00 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Fri, 12 Feb 2021 13:34:33 -0800 Subject: [PATCH] Fix window size issue --- manimlib/window.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/manimlib/window.py b/manimlib/window.py index a8746659..ddf0d8fe 100644 --- a/manimlib/window.py +++ b/manimlib/window.py @@ -20,7 +20,6 @@ class Window(PygletWindow): self.scene = scene self.pressed_keys = set() - self.title = str(scene) self.size = size @@ -33,14 +32,14 @@ class Window(PygletWindow): # it sometimes doesn't actually change the position # to the specified tuple on the rhs, but doing it # twice seems to make it work. ¯\_(ツ)_/¯ - initial_position = self.find_initial_position() + initial_position = self.find_initial_position(size) self.position = initial_position self.position = initial_position - def find_initial_position(self): + def find_initial_position(self, size): custom_position = get_customization()["window_position"] monitor = get_monitors()[get_customization()["window_monitor"]] - window_width, window_height = self.size + window_width, window_height = size # Position might be specified with a string of the form # x,y for integers x and y if "," in custom_position: