@@ -98,20 +98,20 @@ def _calc_x_positions(self, display):
9898 x = 0
9999 widths = []
100100 midline = False
101- for idx , col in enumerate (self .columns ):
102- cname = col [0 ]
103- width = col [2 ]
104- just = col [3 ]
101+ for idx , (cname , _ , col_width , just ) in enumerate (self .columns ):
105102 charwidth = max (
106- _text_width (cname ), int (display ._winsize [1 ] * width )
103+ _text_width (cname ), int (display ._winsize [1 ] * col_width )
107104 )
108105 if just == "L" :
109106 widths .append ((x , charwidth ))
110107 x += charwidth
111108 else :
112109 width = sum (
113- max (_text_width (cname ), int (display ._winsize [1 ] * width ))
114- for col in self .columns [idx :]
110+ max (
111+ _text_width (r_cname ),
112+ int (display ._winsize [1 ] * r_col_width ),
113+ )
114+ for (r_cname , _ , r_col_width , _ ) in self .columns [idx :]
115115 )
116116 x = display ._winsize [1 ] - width
117117 if not midline :
@@ -193,9 +193,9 @@ def render(self, display, now):
193193
194194class ProgStatsLayout (StatLayout ):
195195 columns = [
196- ("hostname\n (#R&[dis]#G&connected#d&)" , "%s" , 0.12 , "L" ),
196+ ("hostname\n (#R&[dis]#G&connected#d&)" , "%s" , 0.18 , "L" ),
197197 ("progname" , "%s" , 0.15 , "L" ),
198- ("last msg\n secs / int" , "%s/%3d" , 0.15 , "R" ),
198+ ("last msg\n secs / int" , "%s/%3d" , 0.10 , "R" ),
199199 ("processes\n curr / max" , "%4d/%4d" , 0.15 , "R" ),
200200 ("connections\n curr / max / int" , "%4d/%4d/%4d" , 0.15 , "R" ),
201201 ("checkouts\n curr / max / int" , "%4d/%4d/%4d" , 0.15 , "R" ),
0 commit comments