The watch window appears in the center of the screen as default

Bug #630708 reported by Anders S. Nordbø
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Low
Unassigned

Bug Description

When opening a new watch window (opened when clicking anywhere, from the Action window > Watch tab > Watch field in seperate window) the window appears in the center of the screen.

This is a problem the way I use this feature. Normally a watch window is useful to keep track of something away from the main view. Every time I open a watch window I have to move it away to the top (and I prefer left side) corner so I can continue with whatever I was doing while the watch window is not in my way. That's why I think the watch window should be docked to the top left of the screen.

Revision history for this message
SirVer (sirver) wrote :

annoys me too.

Changed in widelands:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Seems similar to bug 536545. Mark as duplicates?

Revision history for this message
SirVer (sirver) wrote :

no, this is distinct enough. I posted a cross reference there though.

Revision history for this message
Andreas Breitschopp (ab-tools) wrote :

I came across this, too, and as it was very easy to fix I've attached a patch for it.

Now the watch windows is opened at the top left position on the screen.

While applying this change I've added also some more constants to the code to be more consistent and making future changes more easy.

Changed in widelands:
status: Confirmed → In Progress
Revision history for this message
Nicolai Hähnle (nha) wrote :

Actually, I don't like this "fix" at all. What's so special about the top-left corner? I, for example, have the stock window open there and wouldn't want it to overlap with the watch window.

A much better fix would be to turn the WatchWindow into a UniqueWindow: this class already provides the capability of re-opening a window exactly in the same place where the user last moved it. In that way, you'd have to move the watch window once to your preferred position at the beginning of the game, and wouldn't have to worry about it after that.

Alternatively, in case the WatchWindow isn't supposed to be unique, perhaps the existing UniqueWindow functionality can be extended in some way to remember the favourite location of multiple windows.

Revision history for this message
Anders S. Nordbø (anders-sandberg-nordbo) wrote :

I think this may be an even better fix, but so far sounds like more people prefer the window bound top so it probably should start up there (unless the window positions are persistent between application startups), let the user move the window, and then keep track of where the user wants the window like you say.

Revision history for this message
Anders S. Nordbø (anders-sandberg-nordbo) wrote :

Would probably be useful if most window positons are saved to disk as part of preferences

Revision history for this message
Andreas Breitschopp (ab-tools) wrote :

Hello Nicolai,

I just fixed it as it says in the issue. ;-)

But yes, you're absolutely right, this would be the best solution, but it would need more work, because UniqueWindow needs to be extended as you already said.

Maybe the fix could be used as an intermediate fix till someone implemented the more complex way, because I would say the watch windows makes at least more since at the top left than at the center of the screen.

And I also totally agree with Anders that it would be very good if all window positions would be saved inside the save game. But additionally also which windows are open. This way when the user starts a saved game all windows are opened again at the same position automatically.

Best regards
Andreas

Revision history for this message
Nicolai Hähnle (nha) wrote :

I agree that saving window coordinates would be a good idea. In fact, I would prefer the basic "preferred coordinate" storage to be in a global conf file, so that I don't have to rearrange windows in every new game. This would fit together well with also storing the open windows (and their current coordinates) in the savegame.

However, I do think this intermediate "fix" should be reverted eventually. If you think about it, once saving coordinates has been implemented, the default coordinates are only seen by novice players, and for them it seems more reasonable to let all windows open in the center of the screen, because that will be closer to where the eyes are focused on average.

(Of course some specific, non-global windows should not open in the center, but at some other reasonable position; for example, the FieldActionWindow already tries to place itself in such a way that it does not cover the field that was clicked on.)

Revision history for this message
Andreas Breitschopp (ab-tools) wrote :

Hello Nicolai,

yes, I agree that this would be the best solution. But I'm afraid I'm not familiar enough with the Widelands code yet to implement that myself.

But anyway, maybe you could apply the patch I've attached to this post now:
it won't change anything for the user, but makes the code much cleaner by using constants for important values like the window position and size (as done also for other UI windows) instead of just hard code them directly within the code.

Best regards
Andreas

Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: In Progress → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
SirVer (sirver)
Changed in widelands:
status: Expired → Confirmed
Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for widelands because there has been no activity for 60 days.]

Changed in widelands:
status: Incomplete → Expired
SirVer (sirver)
Changed in widelands:
status: Expired → Confirmed
Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.