Closed rohitarondekar closed 1 year ago
Zoom level resets in Windows as well. I just tried this out.
Some things I have noticed.
1.As said earlier, the application does not remember the zoom level and it resets when the app is restarted. 2.The zoom level increases and decreases by a different values for some reason after you have initially zoomed in or zoomed out. If you have already zoomed in then open the app again and then again zoom in, the zoom value increases by a lot.
Here is how it was fixed in standard notes (also electron app inside appimage)
We use window.main.ts
to store and restore the window state, such as size and position. The existing patterns could be extended to remember zoom level as well. I've added it to the list of vetted issues, but PRs would be welcome if anyone wants to tackle it in the meantime.
I'd like to work on this if you can assign it to me.
@shumsk01 any updates on the fix? I can join and help out if needed
I have the same problem on windows, a workaround is to double click on window title maximizing the window, this reset the zoom as saved setttings. Doesn't do the same if click on maximize window button
I'm having this issue on macOS as well. Zoom levels are not remembered across application restarts. As of latest upgrade Version 2022.6.1 (3610)
.
@skyler-shuman have you been able to make progress with this? If not, I can unassign , and be open to any PR. @anthonygedeon you could also let me know if still interested to work on this, and it would be assigned to you.
My apologies for not communicating better. I had some issues that limited my ability to work on the project.
My initial idea for a solution was to extend the WindowState
to include the webPreferences -> zoomState
. However, there is not currently a use of webPreferences
in updateWindowState
and I'm unsure if it would be a good idea to add one.
An alternative solution, similar to what occurred in standardnotes would be to introduce a zoomManager dedicated to handling zoom. However, this doesn't seem like the best solution given BrowserWindow already has a webPreferences object which stores the zoomState and can restore it when being instantiated.
I am also confused why updateWindowState
takes the argument configKey
but the only configKey
ever passed is mainWindowSizeKey
. It appears to imply there are multiple possible WindowStates
however, the TODO in the WindowState class implies there should only be a singular client-specific global state.
Finally, why is
After further research, I see this was done to prevent TypeScript's abstraction from preventing access of windowStates
's type declaration not for values of the class WindowState
?WindowState
's properties.
Describe the Bug
The Bitwarden desktop application on Ubuntu does not remember zoom settings. My laptop display has a high resolution and so I need to be able to zoom for the UI to be legible. Setting the zoom level manually at the moment every time I start the app.
Steps To Reproduce
Expected Result
My previously set zoom level should be restored.
Actual Result
The zoom level is reset to default making everything small again.
Environment
Additional Context
There appears to be some memory retention of the zoom level because when I try to zoom again it goes one level higher then what I've set. So I'm guessing the zoom level is remembered but not applied at startup?
This might not be a priority as it's not the responsibility of the application to deal with HiDPI screens(?), but since there is the option to set zoom levels, being able to remember it would be a big help. I'd be happy to help with the code if it isn't very complicated to fix.