mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 17:40:27 +00:00
Minor Terminal tweaks.
This commit is contained in:
parent
d14ec951ea
commit
a8e42bacf4
Notes:
sideshowbarker
2024-07-19 16:02:20 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/a8e42bacf49
2 changed files with 3 additions and 3 deletions
|
@ -11,7 +11,7 @@ void Terminal::create_window()
|
|||
auto& font = Font::defaultFont();
|
||||
|
||||
m_pixel_width = m_columns * font.glyphWidth() + m_inset * 2;
|
||||
m_pixel_height = (m_rows * (font.glyphHeight() + m_line_spacing)) + (m_inset * 2);
|
||||
m_pixel_height = (m_rows * (font.glyphHeight() + m_line_spacing)) + (m_inset * 2) - m_line_spacing;
|
||||
|
||||
GUI_CreateWindowParameters params;
|
||||
params.rect = { { 300, 300 }, { m_pixel_width, m_pixel_height } };
|
||||
|
@ -397,7 +397,7 @@ void Terminal::paint()
|
|||
char ch = m_buffer[(row * m_columns) + (column)];
|
||||
auto& attribute = m_attributes[(row * m_columns) + (column)];
|
||||
int x = column * font.glyphWidth();
|
||||
Rect glyph_rect { x + m_inset, y + m_inset, font.glyphWidth(), font.glyphHeight() + m_line_spacing};
|
||||
Rect glyph_rect { x + m_inset, y + m_inset, font.glyphWidth(), font.glyphHeight() + m_line_spacing };
|
||||
auto glyph_background = ansi_color(attribute.background_color);
|
||||
painter.fill_rect(glyph_rect, glyph_background);
|
||||
if (ch == ' ')
|
||||
|
|
|
@ -97,7 +97,7 @@ void Painter::draw_glyph(const Point& point, char ch, Color color)
|
|||
{
|
||||
auto* bitmap = font().glyphBitmap(ch);
|
||||
if (!bitmap) {
|
||||
dbgprintf("Font doesn't have 0x%02x ('%c')\n", ch, ch);
|
||||
dbgprintf("Font doesn't have 0x%02x ('%c')\n", (byte)ch, ch);
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
int x = point.x();
|
||||
|
|
Loading…
Reference in a new issue