aata / mplayerx

Automatically exported from code.google.com/p/mplayerx
0 stars 0 forks source link

Preference window position #72

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. Position pref window where you want it.
2. Quit MPlayerX
3. Launch MPlayerX and open prefs.

Result:
Window is not where you left it before quitting. It's moved to the bottom,
just above the Dock.

Original issue reported on code.google.com by lorenzo.fanchi@gmail.com on 1 Mar 2010 at 1:28

GoogleCodeExporter commented 9 years ago
Forgot to mention: between steps 1 and 2: close prefs window

Original comment by lorenzo.fanchi@gmail.com on 1 Mar 2010 at 1:29

GoogleCodeExporter commented 9 years ago
I can't reproduce it here.
Following the instruction and the window perform just right.

Original comment by zongyao.qu on 2 Mar 2010 at 1:57

GoogleCodeExporter commented 9 years ago
Strange... I also wiped all the preferences to be sure I had a clean setup.

Original comment by lorenzo.fanchi@gmail.com on 2 Mar 2010 at 7:22

GoogleCodeExporter commented 9 years ago
would you please do this for me?

not only just change the position of the Pref window, but also change some 
settings.
then quit MPlayerX and open it.

to see whether the settings are saved as expected?

I doubt that maybe the UserDefaults was not synchronized correctly? Although 
this is 
should not happen from the first release.

Original comment by zongyao.qu on 2 Mar 2010 at 8:02

GoogleCodeExporter commented 9 years ago
Doing that, the changed settings are retained, but again the preference window 
opens
around 50 pixels lower than where I left it..

I leave it like this:
http://i45.tinypic.com/10hu0px.jpg

And it opens like this:
http://i49.tinypic.com/25upe7l.jpg

Original comment by lorenzo.fanchi@gmail.com on 2 Mar 2010 at 8:14

GoogleCodeExporter commented 9 years ago
Fixed it.
It is really a hard-to-find bug.
The frame recorded by AutoSaveName records the y position of bottom-left 
corner, 
but when I load the Preference View, the size is changed by pinning the 
upper-left corner of the window, and 
then the frame was saved by AutoSaveName.
Since the size of every view(include the view with none of preference view 
attached at the very very beginning) 
changes, this make the window moves every time.

Original comment by zongyao.qu on 2 Mar 2010 at 2:40

GoogleCodeExporter commented 9 years ago
Interesting! May I ask how you fixed it?

Original comment by lorenzo.fanchi@gmail.com on 2 Mar 2010 at 2:44

GoogleCodeExporter commented 9 years ago
there are no beautiful skills,
only dirty calculation to compensate the size difference before and after the 
window loads the Pref-Views.

Original comment by zongyao.qu on 4 Mar 2010 at 1:57