|
27 | 27 | #include "GlyphEditorWidget.h"
|
28 | 28 | #include <LibGUI/Painter.h>
|
29 | 29 | #include <LibGfx/Font.h>
|
| 30 | +#include <LibGfx/Palette.h> |
30 | 31 |
|
31 | 32 | GlyphEditorWidget::GlyphEditorWidget(Gfx::Font& mutable_font, GUI::Widget* parent)
|
32 | 33 | : GUI::Frame(parent)
|
@@ -57,26 +58,26 @@ void GlyphEditorWidget::paint_event(GUI::PaintEvent& event)
|
57 | 58 | GUI::Painter painter(*this);
|
58 | 59 | painter.add_clip_rect(frame_inner_rect());
|
59 | 60 | painter.add_clip_rect(event.rect());
|
60 |
| - painter.fill_rect(frame_inner_rect(), Color::White); |
| 61 | + painter.fill_rect(frame_inner_rect(), palette().base()); |
61 | 62 | painter.translate(frame_thickness(), frame_thickness());
|
62 | 63 |
|
63 | 64 | painter.translate(-1, -1);
|
64 | 65 | for (int y = 1; y < font().glyph_height(); ++y)
|
65 |
| - painter.draw_line({ 0, y * m_scale }, { font().max_glyph_width() * m_scale, y * m_scale }, Color::Black); |
| 66 | + painter.draw_line({ 0, y * m_scale }, { font().max_glyph_width() * m_scale, y * m_scale }, palette().threed_shadow2()); |
66 | 67 |
|
67 | 68 | for (int x = 1; x < font().max_glyph_width(); ++x)
|
68 |
| - painter.draw_line({ x * m_scale, 0 }, { x * m_scale, font().glyph_height() * m_scale }, Color::Black); |
| 69 | + painter.draw_line({ x * m_scale, 0 }, { x * m_scale, font().glyph_height() * m_scale }, palette().threed_shadow2()); |
69 | 70 |
|
70 | 71 | auto bitmap = font().glyph_bitmap(m_glyph);
|
71 | 72 |
|
72 | 73 | for (int y = 0; y < font().glyph_height(); ++y) {
|
73 | 74 | for (int x = 0; x < font().max_glyph_width(); ++x) {
|
74 | 75 | Gfx::Rect rect { x * m_scale, y * m_scale, m_scale, m_scale };
|
75 | 76 | if (x >= font().glyph_width(m_glyph)) {
|
76 |
| - painter.fill_rect(rect, Color::MidGray); |
| 77 | + painter.fill_rect(rect, palette().threed_shadow1()); |
77 | 78 | } else {
|
78 | 79 | if (bitmap.bit_at(x, y))
|
79 |
| - painter.fill_rect(rect, Color::Black); |
| 80 | + painter.fill_rect(rect, palette().base_text()); |
80 | 81 | }
|
81 | 82 | }
|
82 | 83 | }
|
|
0 commit comments