Replace applicationStorageMainService with stateMainService#169365
Replace applicationStorageMainService with stateMainService#169365Tyriar merged 1 commit intomicrosoft:mainfrom
Conversation
|
@Tyriar I found a small problem, here if we use the screen scale as a divisor, it will cause the length and width to be reduced when it is created, on Mac, the scale is 2, probably because we did not consider the screen scale when storing or we don't need to think about it on Mac? |
|
Cool! |
It may be related to the operating system, I will look at the related logic, if you do not use scale, will the size of the window on your Windows be enlarged? |
|
Yes, saving the state on my second monitor would make the window 50% larger when I reopen the explorer. |
That probably does need to be scaled, my monitors have the same resolution, I'll check the logic here |
|
I am not sure if it would be worthwhile maybe making this code reusable: We use it to validate the window state is in bounds of the display. In general I would argue that window state storing and restoring is relatively complex, so there is probably lots of good knowledge already for workbench windows to look at. Here is how we serialize the state: |
Thank! I'll go and understand the logic here |
|
@Tyriar Does your monitor have amplified DPI? e.g 200% DPI |
|
@weartist it's a 4k monitor at 1.5 scale in the OS, next to a 1080p monitor at 1 scale |
Tyriar
left a comment
There was a problem hiding this comment.
Thanks for the follow up! For the scale issue, I tested it again and it does still happen. it's relatively minor as I think it would only happen when you have mixed scale monitors.
resolved #169363