From 8f5bbe96359a6faabdd14ac1734da80fcd732e13 Mon Sep 17 00:00:00 2001 From: Isaiah Odhner Date: Sat, 15 Apr 2023 21:47:14 -0400 Subject: [PATCH] Fix incorrect window layouts --- paint.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/paint.py b/paint.py index f1382bb..4f777f3 100644 --- a/paint.py +++ b/paint.py @@ -719,6 +719,8 @@ class PaintApp(App): ) self.mount(window) self.expand_directory_tree(window.content.query_one("#save_as_directory_tree")) + # Fix for incorrect layout that would only resolve on mouse over + self.set_timer(0.01, lambda: self.app.update_styles(window)) def expand_directory_tree(self, tree: DirectoryTree) -> None: """Expand the directory tree to the target directory, either the folder of the open file or the current working directory.""" @@ -806,7 +808,8 @@ class PaintApp(App): ) ) self.mount(window) - + # Fix for incorrect layout that would only resolve on mouse over + self.set_timer(0.01, lambda: self.app.update_styles(window)) def action_open(self) -> None: """Open an image from a file.""" @@ -849,6 +852,8 @@ class PaintApp(App): ) self.mount(window) self.expand_directory_tree(window.content.query_one("#open_dialog_directory_tree")) + # Fix for incorrect layout that would only resolve on mouse over + self.set_timer(0.01, lambda: self.app.update_styles(window)) def action_new(self) -> None: """Create a new image."""