[Freeciv-Dev] (PR#8482) heights in gtk2 production dialog
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#8482) heights in gtk2 production dialog |
From: |
"Daniel L Speyer" <dspeyer@xxxxxxxxxxx> |
Date: |
Sat, 10 Apr 2004 16:47:25 -0700 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8482 >
The current setup of the worklist windows (NORMAL_TILE_HEIGHT whether it
needs it or not) in gtk2 uses an awful lot of empty space. It makes it
more necessary to scroll and is (IMHO) ugly. This patch auto-detects
units' actual heights and uses them.
Enjoy,
--Daniel Speyer
--- wldlg.c.old 2004-04-10 17:03:49.000000000 -0400
+++ wldlg.c 2004-04-10 18:52:46.000000000 -0400
@@ -899,9 +899,12 @@
if (is_unit) {
struct canvas store;
+ int x1,x2,y1,y2;
+
+ sprite_get_bounding_box(get_unit_type(id)->sprite,&x1,&y1,&x2,&y2);
pix = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8,
- UNIT_TILE_WIDTH, UNIT_TILE_HEIGHT);
+ MAX(5+x2-x1,36), 5+y2-y1);
store.type = CANVAS_PIXBUF;
store.v.pixbuf = pix;
@@ -991,9 +994,6 @@
*pcol = col;
}
}
- if (show_task_icons) {
- g_object_set(rend, "height", UNIT_TILE_HEIGHT, NULL);
- }
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#8482) heights in gtk2 production dialog,
Daniel L Speyer <=
|
|