1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 23:05:08 +00:00

LibGUI: Move GUI::Model::Role to GUI::ModelRole

This is preparation for using ModelRole in the ModelIndex API.
This commit is contained in:
Andreas Kling 2020-08-16 16:00:07 +02:00
parent f6d7204689
commit a1e381a0f8
66 changed files with 201 additions and 167 deletions

View file

@ -40,7 +40,7 @@ public:
virtual void paint(GUI::Painter& painter, const Gfx::IntRect& a_rect, const Gfx::Palette&, const GUI::Model& model, const GUI::ModelIndex& index) override
{
auto rect = a_rect.shrunken(2, 2);
auto pagemap = model.data(index, GUI::Model::Role::Custom).to_string();
auto pagemap = model.data(index, GUI::ModelRole::Custom).to_string();
float scale_factor = (float)pagemap.length() / (float)rect.width();