[Freeciv-Dev] (PR#10591) window is too large for uranus topologies
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=10591 >
> [mstefek - Mon Oct 18 11:44:54 2004]:
>
> The window is too heigh in both uranus topologies and for both tilesets.
> It doesn't fit in 1024x800 screen
> GTK2 client beta/head
If you find a good maximum height (pixels) for the overview we can limit
the tile size based on that. This patch limits the height to
"approximately" 120 pixels.
jason
? diff
? newtiles
? data/isotrident/selection.png
? data/isotrident/selection.spec
Index: client/mapview_common.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/client/mapview_common.c,v
retrieving revision 1.155
diff -u -r1.155 mapview_common.c
--- client/mapview_common.c 17 Oct 2004 15:47:48 -0000 1.155
+++ client/mapview_common.c 19 Oct 2004 07:08:42 -0000
@@ -2444,16 +2444,15 @@
{
int shift = 0; /* used to calculate shift in iso view */
- /* Set the scale of the overview map. Note, since only the width is
- * used to calculate the overview scale you can end up with a really
- * tall or short overview if your map is unusually sized. */
-
- OVERVIEW_TILE_SIZE = (120 / width) + 1;
+ /* Set the scale of the overview map. This attempts to limit the overview
+ * to 120 pixels wide or heigh. */
if (MAP_IS_ISOMETRIC) {
- OVERVIEW_TILE_SIZE = MAX(120 / width, 1);
+ OVERVIEW_TILE_SIZE = MIN(MAX(120 / width, 1), 120 / height + 1);
/* Clip half tile left and right. See comment in map_to_overview_pos. */
shift = (!topo_has_flag(TF_WRAPX) ? -OVERVIEW_TILE_SIZE : 0);
+ } else {
+ OVERVIEW_TILE_SIZE = MIN(120 / width + 1, 120 / height + 1);
}
overview.height = OVERVIEW_TILE_HEIGHT * height;
|
|