Changeset fe67f1f for popwin.c


Ignore:
Timestamp:
Apr 18, 2004, 11:55:42 AM (17 years ago)
Author:
James M. Kretchmar <kretch@mit.edu>
Branches:
master, barnowl_perlaim, debian, owl, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
818a073
Parents:
7fad773
Message:
Do OLC formatting for anything coming from olc.matisse
Improvements to popup size algorithm (from gildea)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • popwin.c

    rad96951 rfe67f1f  
    1919  glines=owl_global_get_lines(&g);
    2020  gcols=owl_global_get_cols(&g);
    21   if (glines > 24) {
    22     pw->lines=glines/2;
    23     startline=glines/4;
    24   } else {
    25     pw->lines=(glines*3)/4;
    26     startline=glines/8;
    27   }
    2821
    29   pw->cols=(gcols*15)/16;
    30   startcol=gcols/32;
    31   if (pw->cols > 100) {
    32     pw->cols=100;
    33     startcol=(gcols-100)/2;
    34   }
     22  pw->lines = owl_util_min(glines,24)*3/4 + owl_util_max(glines-24,0)/2;
     23  startline = (glines-pw->lines)/2;
     24
     25  pw->cols = owl_util_min(gcols,100)*15/16 + owl_util_max(gcols-100,0)/2;
     26  startcol = (gcols-pw->cols)/2;
    3527
    3628  pw->borderwin=newwin(pw->lines, pw->cols, startline, startcol);
Note: See TracChangeset for help on using the changeset viewer.