Move AIS recent items list draw function back into class.

This commit is contained in:
Jared Boone 2016-01-17 19:08:08 -08:00
parent fb8e5b21df
commit eda6e6a5be
2 changed files with 10 additions and 2 deletions

View File

@ -299,7 +299,7 @@ bool AISRecentEntriesView::on_key(const ui::KeyEvent event) {
return false;
}
static void ais_list_item_draw(
void AISRecentEntriesView::draw(
const AISRecentEntry& entry,
const Rect& target_rect,
Painter& painter,
@ -336,7 +336,7 @@ void AISRecentEntriesView::paint(Painter& painter) {
for(auto p = range.first; p != range.second; p++) {
const auto& entry = *p;
const auto is_selected_key = (selected_key == entry.key());
ais_list_item_draw(entry, target_rect, painter, s, (has_focus() && is_selected_key));
draw(entry, target_rect, painter, s, (has_focus() && is_selected_key));
target_rect.pos.y += target_rect.height();
}
}

View File

@ -151,6 +151,14 @@ private:
const EntryKey invalid_key = 0xffffffff;
void advance(const int32_t amount);
void draw(
const AISRecentEntry& entry,
const Rect& target_rect,
Painter& painter,
const Style& style,
const bool is_selected
);
};
class AISRecentEntryDetailView : public View {