made the first prototype, scrolling and word wrapping seems to be working

This commit is contained in:
Blue 2020-08-17 13:27:14 +03:00
parent e54cff0f0c
commit e1eea2f3a2
2 changed files with 132 additions and 18 deletions

View file

@ -45,6 +45,7 @@ public:
protected slots:
void rowsInserted(const QModelIndex & parent, int start, int end) override;
void verticalScrollbarValueChanged(int value) override;
protected:
int verticalOffset() const override;
@ -52,6 +53,9 @@ protected:
void paintEvent(QPaintEvent * event) override;
void updateGeometries() override;
private:
bool tryToCalculateGeometriesWithNoScrollbars(const QStyleOptionViewItem& option, const QAbstractItemModel* model, uint32_t totalHeight);
private:
struct Hint {
bool dirty;
@ -59,6 +63,7 @@ private:
uint32_t height;
};
std::deque<Hint> hints;
int vo;
};