diff options
Diffstat (limited to 'src/layout.c')
-rw-r--r-- | src/layout.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/layout.c b/src/layout.c index 9d4b556..f83976f 100644 --- a/src/layout.c +++ b/src/layout.c | |||
@@ -13,6 +13,12 @@ static void ResizeTable(uiTable* table, int width, int height) { | |||
13 | return; | 13 | return; |
14 | } | 14 | } |
15 | 15 | ||
16 | table->height = height; | ||
17 | |||
18 | // Compute the number of rows that are visible at once. | ||
19 | table->num_visible_rows = height / g_ui.font->header.glyph_height; | ||
20 | assert(table->num_visible_rows <= table->rows); | ||
21 | |||
16 | // Determine if there is vertical overflow. This determines whether we need to | 22 | // Determine if there is vertical overflow. This determines whether we need to |
17 | // render a scroll bar, in which case room must be made for it. | 23 | // render a scroll bar, in which case room must be made for it. |
18 | table->flags.vertical_overflow = | 24 | table->flags.vertical_overflow = |