UI: Add setter function for grid view item tile size
No user visible change expected. Needed in #104831 (not worth polluting the PR with such minor changes, so committing this to main already).
This commit is contained in:
@@ -131,6 +131,8 @@ class AbstractGridView : public AbstractView {
|
||||
int get_item_count() const;
|
||||
int get_item_count_filtered() const;
|
||||
|
||||
void set_tile_size(int tile_width, int tile_height);
|
||||
|
||||
protected:
|
||||
virtual void build_items() = 0;
|
||||
|
||||
|
||||
@@ -109,6 +109,12 @@ int AbstractGridView::get_item_count_filtered() const
|
||||
return i;
|
||||
}
|
||||
|
||||
void AbstractGridView::set_tile_size(int tile_width, int tile_height)
|
||||
{
|
||||
style_.tile_width = tile_width;
|
||||
style_.tile_height = tile_height;
|
||||
}
|
||||
|
||||
GridViewStyle::GridViewStyle(int width, int height) : tile_width(width), tile_height(height) {}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user