mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-25 22:01:41 +00:00
Rename model method to match the rust API
This commit is contained in:
parent
37e550e540
commit
2ae4f1757b
2 changed files with 19 additions and 10 deletions
|
|
@ -14,8 +14,8 @@ using InkData = std::tuple<sixtyfps::Color, float>;
|
|||
|
||||
struct InkLevelModel : sixtyfps::Model<InkData>
|
||||
{
|
||||
int count() const override { return m_data.size(); }
|
||||
InkData get(int i) const override { return m_data[i]; }
|
||||
int row_count() const override { return m_data.size(); }
|
||||
InkData row_data(int i) const override { return m_data[i]; }
|
||||
|
||||
std::vector<InkData> m_data = { { sixtyfps::Color::from_rgb_uint8(255, 255, 0), 0.9 },
|
||||
{ sixtyfps::Color::from_rgb_uint8(0, 255, 255), 0.5 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue