1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:27:43 +00:00

Spreadsheet+LibGUI: Calculate cell position given scroll position

Take into account the current scroll position when calculating the
position of cells. This way when the user scrolls either horizontally
or vertically, the calculations done to find the cell position
will be correct.
This commit is contained in:
martinfalisse 2022-03-07 16:26:21 +01:00 committed by Ali Mohammad Pur
parent 5759b25ca8
commit 11dffbd96f
3 changed files with 11 additions and 4 deletions

View file

@ -55,6 +55,7 @@ public:
Gfx::IntPoint adjusted_position(const Gfx::IntPoint&) const;
virtual Gfx::IntRect content_rect(const ModelIndex&) const override;
Gfx::IntRect content_rect_minus_scrollbars(const ModelIndex&) const;
Gfx::IntRect content_rect(int row, int column) const;
Gfx::IntRect row_rect(int item_index) const;