@@ -301,26 +301,32 @@ pager_rep::make_pages () {
301301
302302 int nr_pages= N (pages);
303303 int nx = max (1 , min (env->page_packet , nr_pages));
304- int d = env->page_offset % nx;
305- int ny = ((nr_pages + nx - 1 + d) / nx);
306-
307- SI pixel= env->pixel ;
308- array<box> pg = pages;
309- if (env->get_string (PAGE_MEDIUM) == " paper" &&
310- env->get_string (PAGE_BORDER) != " none" )
304+ if (env->page_packet == 2 ) nx= max (1 , env->page_packet );
305+ int d = env->page_offset % nx;
306+ int ny= ((nr_pages + nx - 1 + d) / nx);
307+
308+ SI pixel= env->pixel ;
309+ SI vgap = 0 ;
310+ if (env->get_string (PAGE_BORDER) == " none" ) {
311+ vgap= 4 * pixel;
312+ }
313+ array<box> pg= pages;
314+ if (env->get_string (PAGE_MEDIUM) == " paper" )
311315 for (int i= 0 ; i < nx; i++)
312316 for (int j= 0 ; j < ny; j++) {
313317 int p= j * nx + i - d;
314318 if (p >= 0 && p < nr_pages) {
315- SI l= 10 * pixel, r= 10 * pixel;
316- SI b= 10 * pixel, t= 10 * pixel;
317- if (env->get_string (PAGE_BORDER) == " attached" ) {
318- #ifdef QTTEXMACS
319- if (i > 0 ) l= pixel / 2 ;
320- #else
319+ SI l= 0 , r= 0 , b= 0 , t= 0 ;
320+ if (env->get_string (PAGE_BORDER) != " none" ) {
321+ l= 10 * pixel, r= 10 * pixel;
322+ b= 10 * pixel, t= 10 * pixel;
323+ if (env->get_string (PAGE_BORDER) == " attached" ) {
324+ if (i > 0 ) l= pixel / 2 ;
325+ if (i < nx - 1 ) r= 0 ;
326+ }
327+ }
328+ else {
321329 if (i > 0 ) l= pixel;
322- #endif
323- if (i < nx - 1 ) r= 0 ;
324330 }
325331 color bg= tm_background;
326332 if (env->get_string (" full-screen-mode" ) == " true" ) bg= black;
@@ -351,7 +357,8 @@ pager_rep::make_pages () {
351357 yy[j]= yy[j - 1 ];
352358 for (int i= 0 ; i < nx; i++) {
353359 int p= j * nx + i - d;
354- if (p >= 0 && p < nr_pages) yy[j]= min (yy[j - 1 ] - pg[p]->h (), yy[j]);
360+ if (p >= 0 && p < nr_pages)
361+ yy[j]= min (yy[j - 1 ] - pg[p]->h () - vgap, yy[j]);
355362 }
356363 }
357364
0 commit comments