Butterfly icon indicating copy to clipboard operation
Butterfly copied to clipboard

[Bug]: Butterfly doesn't restore window state when reopening

Open Poopooracoocoo opened this issue 3 years ago • 6 comments

What happened?

After resizing and moving a Butterfly window on my Windows device and relaunching, Butterfly returns to its original size and position. This behaviour is not expected. It means that I need to resize Butterfly and move it every time so that I can see the full window on my screen. I would also expect Butterfly to reopen as a maximised window if it was closed as one.

It would also help to make Butterfly's default window size smaller

Version

1.4.3

Platform

Windows

Relevant log output

No response

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

P.S. Super grateful for Butterfly! Thank you!

Poopooracoocoo avatar Aug 22 '22 09:08 Poopooracoocoo

it was intential but i think it does not make sense to center it every time when it was opened

CodeDoctorDE avatar Aug 22 '22 09:08 CodeDoctorDE

Hmm I looked again but i didn't set size. https://github.com/LinwoodCloud/Butterfly/blob/develop/app/lib/main.dart#L65 I will investigate it

CodeDoctorDE avatar Aug 22 '22 09:08 CodeDoctorDE

For now, you can use the native window title setting to have the same state

CodeDoctorDE avatar May 17 '23 08:05 CodeDoctorDE

This should be fixed by 2.0.0-alpha.4 with #385. Can you please check that?

CodeDoctorDE avatar May 23 '23 16:05 CodeDoctorDE

Just tested the portable Windows build of Butterfly Nightly 2.0.0-alpha.4 and still see the following:

  • Default size is really large on my screen. 1920x1080 display. Windows is set to 150% scale.
  • Default position is not centred.
  • It does not remember the position, size, or whether it was maximized.
  • When enabling native window title bar, I could still see the above three observations, just like on 1.6.1.

Something new I found was that clicking the caption buttons like maximize/restore takes a while to do the action (this doesn't occur with the native title bar). It's also possible to drag the window by the caption buttons, which is unusual on Windows. On both Butterfly 1.6.1 and 2.0.0-alpha.4, the caption buttons don't extend to the edges of the window, which is also unusual on Windows.

Once again, thanks for the amazing app!! Love Butterfly!

Poopooracoocoo avatar May 24 '23 05:05 Poopooracoocoo

I reported this bug to the lib I use. The size can't be restored because it's a flutter problem Currently I can change the default size and the problem with the caption buttons

CodeDoctorDE avatar May 24 '23 05:05 CodeDoctorDE