Window: calculate m_rows
This commit is contained in:
parent
862b414c1d
commit
d043137099
@ -256,6 +256,7 @@ void Window::resize()
|
|||||||
m_columns = m_width / m_font.get_advance();
|
m_columns = m_width / m_font.get_advance();
|
||||||
if (m_columns < 1)
|
if (m_columns < 1)
|
||||||
m_columns = 1;
|
m_columns = 1;
|
||||||
|
m_rows = (m_height + m_font.get_line_height() - 1) / m_font.get_line_height();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::redraw()
|
void Window::redraw()
|
||||||
|
@ -31,6 +31,7 @@ protected:
|
|||||||
|
|
||||||
Font m_font;
|
Font m_font;
|
||||||
int m_columns;
|
int m_columns;
|
||||||
|
int m_rows;
|
||||||
|
|
||||||
std::shared_ptr<Buffer> m_buffer;
|
std::shared_ptr<Buffer> m_buffer;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user