Skip to content

Commit

Permalink
Use proper color when painting InputNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
martonmiklos authored and ad3154 committed Dec 9, 2024
1 parent 79926f9 commit e2c6895
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/InputNumberComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void InputNumberComponent::paint(Graphics &g)
(isobus::VirtualTerminalObjectType::FontAttributes == child->get_object_type()))
{
auto font = std::static_pointer_cast<isobus::FontAttributes>(child);
auto colour = parentWorkingSet->get_colour(font->get_background_color());
auto colour = parentWorkingSet->get_colour(font->get_colour());
Font juceFont(Font::getDefaultMonospacedFontName(), font->get_font_height_pixels(), Font::FontStyleFlags::plain);
auto fontWidth = juceFont.getStringWidthFloat("1");
juceFont.setHorizontalScale(static_cast<float>(font->get_font_width_pixels()) / fontWidth);
Expand Down

0 comments on commit e2c6895

Please sign in to comment.