wok-4.x view xpat2/stuff/layout.patch @ rev 12290

fox14: update bdeps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon May 28 00:25:24 2012 +0200 (2012-05-28)
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) {