<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39347 >

I've analyzed this bug in S2_1 to try to fix it. I think I understand it now.

This is in short what happens: overview (minimap) + sidepanel (unit
info) + chatbox together request more space vertically than (I) have
(1024px). chatbox per default requests 100 px, panel something like
650 with amplio tileset and the minimap when things go wrong requests
216 px.

This is what happens: when a game is loaded, the overview looks at its
current size to decide how much space it should grab. The larger it
already is (from the last game, by default it is 160 by 100), the more
it grabs. And it rounds up. This is in client/overview_common.c

If civclient is started from scratch, savegame above is loaded directly:
overview is 160x100 by default.
It is calculated that overview should be 108 x 108 for this game for
the 54 x 108 tile map


If civclient is run to reproduce this bug:
overview is 160x100 by default
A game with standard settings is started from scratch
It is calculated that the overview should be 216x144 for a 54 x 72 tile map
game is left
The above savegame is loaded, and now it is calculated differently,
overview now grabs 216x216 pixels. Total vertical requested space is
now more than screen height, and the window resizes so that the lower
part (chatline) is obscured.

This can be avoided: chatline default space request can be lowered to
buy some margin.

But note that: the problem is really that the algorithm for overview
resize from game to game is not "stable", it should probably be
rewritten.



_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to