diff --git a/firmware/application/ui_spectrum.cpp b/firmware/application/ui_spectrum.cpp index 4362db67..a3b7c896 100644 --- a/firmware/application/ui_spectrum.cpp +++ b/firmware/application/ui_spectrum.cpp @@ -114,6 +114,7 @@ void FrequencyScale::draw_frequency_ticks(Painter& painter, const Rect r) { (magnitude_n >= 6) ? "M" : (magnitude_n >= 3) ? "k" : ""; const std::string label = to_string_dec_uint(tick_offset) + zero_pad + unit; + const auto label_width = style().font.size_of(label).w; const Coord offset_low = r.left() + x_center - pixel_offset; const Rect tick_low { offset_low, r.top(), 1, r.height() }; @@ -123,7 +124,7 @@ void FrequencyScale::draw_frequency_ticks(Painter& painter, const Rect r) { const Coord offset_high = r.left() + x_center + pixel_offset; const Rect tick_high { offset_high, r.top(), 1, r.height() }; painter.fill_rectangle(tick_high, Color::white()); - painter.draw_string({ offset_high + 2, r.top() }, style(), label ); + painter.draw_string({ offset_high - 2 - label_width, r.top() }, style(), label ); tick_offset += tick_interval; }