From 1de18c1397bfb069771c02336e47b89e098b6f43 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Tue, 23 May 2006 00:07:02 +0000 Subject: Add window action class for action area labels at the bottom of windows. Adjust txt_table_t to expand tables to their maximum width when they only have one column (ensures separators reach the window edges). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 515 --- textscreen/txt_table.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'textscreen/txt_table.c') diff --git a/textscreen/txt_table.c b/textscreen/txt_table.c index ccf81db2..4c502c0c 100644 --- a/textscreen/txt_table.c +++ b/textscreen/txt_table.c @@ -365,6 +365,15 @@ static void TXT_TableDrawer(TXT_UNCAST_ARG(table), int w, int selected) CalcRowColSizes(table, row_heights, column_widths); + // If this table only has one column, expand column size to fit + // the display width. Ensures that separators reach the window edges + // when drawing windows. + + if (table->columns == 1) + { + column_widths[0] = w; + } + // Draw all cells draw_y = origin_y; -- cgit v1.2.3