mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Fix window size issue
This commit is contained in:
parent
8f502f2790
commit
a46b7d6931
1 changed files with 3 additions and 4 deletions
|
@ -20,7 +20,6 @@ class Window(PygletWindow):
|
||||||
|
|
||||||
self.scene = scene
|
self.scene = scene
|
||||||
self.pressed_keys = set()
|
self.pressed_keys = set()
|
||||||
|
|
||||||
self.title = str(scene)
|
self.title = str(scene)
|
||||||
self.size = size
|
self.size = size
|
||||||
|
|
||||||
|
@ -33,14 +32,14 @@ class Window(PygletWindow):
|
||||||
# it sometimes doesn't actually change the position
|
# it sometimes doesn't actually change the position
|
||||||
# to the specified tuple on the rhs, but doing it
|
# to the specified tuple on the rhs, but doing it
|
||||||
# twice seems to make it work. ¯\_(ツ)_/¯
|
# 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
|
||||||
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"]
|
custom_position = get_customization()["window_position"]
|
||||||
monitor = get_monitors()[get_customization()["window_monitor"]]
|
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
|
# Position might be specified with a string of the form
|
||||||
# x,y for integers x and y
|
# x,y for integers x and y
|
||||||
if "," in custom_position:
|
if "," in custom_position:
|
||||||
|
|
Loading…
Add table
Reference in a new issue