wok-6.x view xpat2/stuff/layout.patch @ rev 6016
pixman: Upgrade to 0.18.0
author | Matthew Sheets <rcx@zoominternet.net> |
---|---|
date | Sat Aug 14 21:42:26 2010 +0000 (2010-08-14) |
parents | |
children |
line source
1 --- xpat2-1.07.orig/src/layout.c
2 +++ xpat2-1.07/src/layout.c
3 @@ -332,17 +332,9 @@
4 }
5 } else {
6 /* enough space for the slots! */
7 - int currentx = geo.dx;
8 -/* printf("generating high layout for %d,%d\n", geo.w, geo.h); */
9 - if (rem_x >= (rules.numslots + 1) * (geo.cw + geo.dx) &&
10 - !(rules.variant & NODEAL)) {
11 - /* there is space for the deck, and we can use one! */
12 - geo.pg[game.numpiles-1].x = geo.dx;
13 - geo.pg[game.numpiles-1].y = geo.dy + geo.ch + geo.dy;
14 - currentx += geo.cw + geo.dx;
15 - new_layout_type = GEN_BIG_LAYOUT_WITH_DECK;
16 - geo.preferred_width += geo.dx + geo.cw;
17 - }
18 + int currentx = geo.dx + rules.numdecks * (geo.cw + geo.dx);
19 + new_layout_type = GEN_BIG_LAYOUT_WITH_DECK;
20 + geo.preferred_width += rules.numdecks * (geo.dx + geo.cw);
21 for (i = 0; i < rules.numslots; ++i) {
22 /* create slot of full window height */
23 p->x = currentx;
24 @@ -351,6 +343,14 @@
25 currentx += geo.cw + geo.dx;
26 ++p;
27 }
28 + /* finally, position the decks */
29 + for (i = 0; i < rules.numdecks; ++i) {
30 + p[0].x = i * (geo.dx + geo.cw);
31 + p[1].x = p[0].x;
32 + p[0].y = geo.dy + 2 * (geo.ch + geo.dy);
33 + p[1].y = geo.dy + geo.ch + geo.dy;
34 + p += 2;
35 + }
36 /* redo pos. of stacks */
37 p = geo.pg;
38 for (i = 0; i < rules.numstacks; ++i) {