Fix the window getting smaller each time it's opened#413
Fix the window getting smaller each time it's opened#413Insprill merged 1 commit intojpochyla:masterfrom Insprill:fix/window-size
Conversation
|
Wait why is it smaller than the expected size? What's actually causing the window to be smaller? |
|
Maybe this might have to do with the fact the window location is not being saved as well? |
|
I don't think it's due to the location not being saved. When the application starts, the saved size is correct. However, immediately after, it gets resized a little smaller. I thought maybe it was related to one size including the title bar and one size not, but that doesn't explain the width shrinking. I tried digging around in Druid to figure out where the resize event is even coming from, but I didn't have much luck. |
| // This is a little hacky, but without it, the window will slowly get smaller each time the application is opened. | ||
| if !self.size_updated { | ||
| self.size_updated = true; | ||
| } else { | ||
| data.config.window_size = size; | ||
| } |
There was a problem hiding this comment.
It would be great to keep an issue related to this open so we can figure out a proper solution.
|
@Insprill thanks for all the awesome commits lately! |
When the window is created, there's an initial WindowSize event that's slightly smaller than the desired window size. This causes the app to keep getting smaller each time it's opened until it's hit the minimum window size. This makes it so the first WindowSize event doesn't save its size to the config.