wok diff xpat2/stuff/layout.patch @ rev 19980
Up kriss_feed (8.7)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jun 15 08:14:05 2017 +0200 (2017-06-15) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/xpat2/stuff/layout.patch Thu Jun 15 08:14:05 2017 +0200 1.3 @@ -0,0 +1,38 @@ 1.4 +--- xpat2-1.07.orig/src/layout.c 1.5 ++++ xpat2-1.07/src/layout.c 1.6 +@@ -332,17 +332,9 @@ 1.7 + } 1.8 + } else { 1.9 + /* enough space for the slots! */ 1.10 +- int currentx = geo.dx; 1.11 +-/* printf("generating high layout for %d,%d\n", geo.w, geo.h); */ 1.12 +- if (rem_x >= (rules.numslots + 1) * (geo.cw + geo.dx) && 1.13 +- !(rules.variant & NODEAL)) { 1.14 +- /* there is space for the deck, and we can use one! */ 1.15 +- geo.pg[game.numpiles-1].x = geo.dx; 1.16 +- geo.pg[game.numpiles-1].y = geo.dy + geo.ch + geo.dy; 1.17 +- currentx += geo.cw + geo.dx; 1.18 +- new_layout_type = GEN_BIG_LAYOUT_WITH_DECK; 1.19 +- geo.preferred_width += geo.dx + geo.cw; 1.20 +- } 1.21 ++ int currentx = geo.dx + rules.numdecks * (geo.cw + geo.dx); 1.22 ++ new_layout_type = GEN_BIG_LAYOUT_WITH_DECK; 1.23 ++ geo.preferred_width += rules.numdecks * (geo.dx + geo.cw); 1.24 + for (i = 0; i < rules.numslots; ++i) { 1.25 + /* create slot of full window height */ 1.26 + p->x = currentx; 1.27 +@@ -351,6 +343,14 @@ 1.28 + currentx += geo.cw + geo.dx; 1.29 + ++p; 1.30 + } 1.31 ++ /* finally, position the decks */ 1.32 ++ for (i = 0; i < rules.numdecks; ++i) { 1.33 ++ p[0].x = i * (geo.dx + geo.cw); 1.34 ++ p[1].x = p[0].x; 1.35 ++ p[0].y = geo.dy + 2 * (geo.ch + geo.dy); 1.36 ++ p[1].y = geo.dy + geo.ch + geo.dy; 1.37 ++ p += 2; 1.38 ++ } 1.39 + /* redo pos. of stacks */ 1.40 + p = geo.pg; 1.41 + for (i = 0; i < rules.numstacks; ++i) {