Hide ui::Rect implementation.

This commit is contained in:
Jared Boone
2016-11-28 11:25:27 -08:00
parent d15ace4676
commit e820bed097
12 changed files with 52 additions and 42 deletions

View File

@@ -200,7 +200,7 @@ void RecentEntriesTable<AISRecentEntries>::draw(
}
line.resize(target_rect.width() / 8, ' ');
painter.draw_string(target_rect.pos, style, line);
painter.draw_string(target_rect.location(), style, line);
}
AISRecentEntryDetailView::AISRecentEntryDetailView() {

View File

@@ -91,7 +91,7 @@ void RecentEntriesTable<ERTRecentEntries>::draw(
}
line.resize(target_rect.width() / 8, ' ');
painter.draw_string(target_rect.pos, style, line);
painter.draw_string(target_rect.location(), style, line);
}
ERTAppView::ERTAppView(NavigationView&) {

View File

@@ -45,7 +45,7 @@ void RecentEntriesHeader::paint(Painter& painter) {
.foreground = parent_style.foreground,
};
auto p = r.pos;
auto p = r.location();
for(const auto& column : _columns) {
const auto width = column.second;
auto text = column.first;

View File

@@ -140,7 +140,7 @@ public:
const auto r = screen_rect();
const auto& s = style();
Rect target_rect { r.pos, { r.width(), s.font.line_height() }};
Rect target_rect { r.location(), { r.width(), s.font.line_height() }};
const size_t visible_item_count = r.height() / s.font.line_height();
auto selected = find(recent, selected_key);

View File

@@ -129,7 +129,7 @@ void RecentEntriesTable<TPMSRecentEntries>::draw(
}
line.resize(target_rect.width() / 8, ' ');
painter.draw_string(target_rect.pos, style, line);
painter.draw_string(target_rect.location(), style, line);
}
TPMSAppView::TPMSAppView(NavigationView&) {

View File

@@ -49,7 +49,7 @@ void Console::write(const std::string& message) {
crlf();
}
const Point pos_glyph {
rect.pos.x() + pos.x(),
rect.left() + pos.x(),
display.scroll_area_y(pos.y())
};
display.draw_glyph(pos_glyph, glyph, s.foreground, s.background);

View File

@@ -54,7 +54,7 @@ void MenuItemView::paint(Painter& painter) {
);
painter.draw_string(
{ r.pos.x() + 8, r.pos.y() + (r.size.height() - font_height) / 2 },
{ r.left() + 8, r.top() + (r.height() - font_height) / 2 },
paint_style,
item.text
);