mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-14 09:45:41 +00:00
Fix printerdemo C++ build after API changes
This commit is contained in:
parent
52b19606d1
commit
246a7142ec
1 changed files with 6 additions and 6 deletions
|
|
@ -12,15 +12,15 @@ LICENSE END */
|
|||
// FIXME: Ideally it should be a better type in the generated code
|
||||
using InkData = std::tuple<sixtyfps::Color, float>;
|
||||
|
||||
struct InkLevelModel : sixtyfps::Model<InkData> {
|
||||
struct InkLevelModel : sixtyfps::Model<InkData>
|
||||
{
|
||||
int count() const override { return m_data.size(); }
|
||||
InkData get(int i) const override { return m_data[i]; }
|
||||
|
||||
std::vector<InkData> m_data = {
|
||||
{ sixtyfps::Color(0xffffff00), 0.9 },
|
||||
{ sixtyfps::Color(0xff00ffff), 0.5 },
|
||||
{ sixtyfps::Color(0xffff00ff), 0.8 },
|
||||
{ sixtyfps::Color(0xff000000), 0.1 }};
|
||||
std::vector<InkData> m_data = { { sixtyfps::Color::from_argb_encoded(0xffffff00), 0.9 },
|
||||
{ sixtyfps::Color::from_argb_encoded(0xff00ffff), 0.5 },
|
||||
{ sixtyfps::Color::from_argb_encoded(0xffff00ff), 0.8 },
|
||||
{ sixtyfps::Color::from_argb_encoded(0xff000000), 0.1 } };
|
||||
};
|
||||
|
||||
int main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue