mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-10-18 09:01:51 +00:00
Hide ui::Size implementation.
This commit is contained in:
@@ -164,7 +164,7 @@ void RegistersWidget::update() {
|
||||
}
|
||||
|
||||
void RegistersWidget::paint(Painter& painter) {
|
||||
const Coord left = (size().w - config.row_width()) / 2;
|
||||
const Coord left = (size().width() - config.row_width()) / 2;
|
||||
|
||||
draw_legend(left, painter);
|
||||
draw_values(left, painter);
|
||||
|
@@ -54,7 +54,7 @@ void MenuItemView::paint(Painter& painter) {
|
||||
);
|
||||
|
||||
painter.draw_string(
|
||||
{ r.pos.x() + 8, r.pos.y() + (r.size.h - font_height) / 2 },
|
||||
{ r.pos.x() + 8, r.pos.y() + (r.size.height() - font_height) / 2 },
|
||||
paint_style,
|
||||
item.text
|
||||
);
|
||||
@@ -87,7 +87,7 @@ void MenuView::set_parent_rect(const Rect new_parent_rect) {
|
||||
for(auto child : children_) {
|
||||
child->set_parent_rect({
|
||||
{ 0, static_cast<ui::Coord>(i * item_height) },
|
||||
{ size().w, item_height }
|
||||
{ size().width(), item_height }
|
||||
});
|
||||
i++;
|
||||
}
|
||||
|
@@ -112,7 +112,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 auto label_width = style().font.size_of(label).width();
|
||||
|
||||
const Coord offset_low = r.left() + x_center - pixel_offset;
|
||||
const Rect tick_low { offset_low, r.top(), 1, r.height() };
|
||||
|
Reference in New Issue
Block a user