mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 18:35:09 +00:00
LibGfx+FontEditor: Add helper to determine raw glyph presence
GlyphBitmaps are considered present if they have a width greater than zero. This adds a counterpart method for raw (unmasked) glyphs and makes intent more explicit throughout FontEditor.
This commit is contained in:
parent
cdaa179eeb
commit
edf86af4f4
3 changed files with 8 additions and 7 deletions
|
@ -97,9 +97,9 @@ void GlyphMapWidget::paint_event(GUI::PaintEvent& event)
|
|||
font().glyph_height());
|
||||
if (glyph == m_selected_glyph) {
|
||||
painter.fill_rect(outer_rect, is_focused() ? palette().selection() : palette().inactive_selection());
|
||||
if (m_font->raw_glyph_width(glyph))
|
||||
if (m_font->contains_raw_glyph(glyph))
|
||||
painter.draw_glyph(inner_rect.location(), glyph, is_focused() ? palette().selection_text() : palette().inactive_selection_text());
|
||||
} else if (m_font->raw_glyph_width(glyph)) {
|
||||
} else if (m_font->contains_raw_glyph(glyph)) {
|
||||
painter.fill_rect(outer_rect, palette().base());
|
||||
painter.draw_glyph(inner_rect.location(), glyph, palette().base_text());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue