LibGUI: GButton's caption should be drawn in the foreground color.

This commit is contained in:
Andreas Kling 2019-04-06 00:57:16 +02:00
parent f6ca94605c
commit 74142d78c1
Notes: sideshowbarker 2024-07-19 14:48:31 +09:00

View file

@ -49,7 +49,7 @@ void GButton::paint_event(GPaintEvent& event)
if (m_icon)
painter.blit(icon_location, *m_icon, m_icon->rect());
auto& font = (m_checkable && m_checked) ? Font::default_bold_font() : this->font();
painter.draw_text(content_rect, m_caption, font, text_alignment(), Color::Black, TextElision::Right);
painter.draw_text(content_rect, m_caption, font, text_alignment(), foreground_color(), TextElision::Right);
}
void GButton::mousemove_event(GMouseEvent& event)