Geoxor / Amethyst

A cross-platform music player made with Typescript
https://amethyst-geoxor.vercel.app/
MIT License
160 stars 36 forks source link

Using the windowed mode toggle button while in the node editor breaks zoom until the window is maximized while in the queue view. #553

Closed okawaffles closed 1 year ago

okawaffles commented 1 year ago

Describe the bug When you are on the node viewing/editing area, and you set the window to windowed mode using the button in the top right, the zoom will be reset to default until you move the maximize window in the queue view.

Amethyst Details (required):

To Reproduce (optional) Steps to reproduce the behavior:

  1. Maximize the window, set the zoom to something other than default.
  2. Select the node editor on the left hand side.
  3. Use the top-right windowed-mode button to set the window to windowed mode.
  4. The zoom will be set to default until the window is maximized, but only when you're in the queue area.

Expected behavior (optional) The zoom should stay as is, regardless of windowed mode or not.

Screenshots (optional) Video of the bug happening

Additional context (optional) This bug also appears to happen while on the settings menu.

okawaffles commented 1 year ago

The bug is not present when I run Amethyst from yarn dev so it might already be fixed..?

Geoxor commented 1 year ago

I've had this bug mentioned before, and i believe it was because i was changing webFrame.setZoomFactor(), it might have been a bug with electron/chromium https://github.com/electron/electron/issues/10572

Just tested it and indeed it seems to work fine with yarn dev but not when built, I hate these production-only issues, ill look more into it

https://github.com/Geoxor/Amethyst/assets/34042825/06f0022a-86fd-4eda-b4dc-d8e1212c8a3f

Geoxor commented 1 year ago

Indeed chromium (i assume) is doing some sort of page-level caching instead of using the same zoom level for the entire domain

https://github.com/Geoxor/Amethyst/assets/34042825/3030e12a-9add-4f7a-856c-b3336c9d2093

okawaffles commented 1 year ago

Interesting. Does the dev build use a different Chromium than production?

Geoxor commented 1 year ago

Just saw this note on the webContents.setZoomLevel()

image

Geoxor commented 1 year ago

Interesting. Does the dev build use a different Chromium than production?

Not that I am aware of, maybe vue-router works differently on prod than dev

Geoxor commented 1 year ago

Here's the window.location.href

production: image

dev: image

Honestly not sure what exactly the cause is by it may be due to it being file:// paths instead of http:// that it treats it as not same-origin

Geoxor commented 1 year ago

my suspicion seems correct:

image