mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 05:40:38 +01:00
[escher] Simplify TableView::scrollToCell
This commit is contained in:
committed by
Émilie Feral
parent
2d7c87d461
commit
a3fe99da21
@@ -34,7 +34,6 @@ protected:
|
||||
void setHorizontalCellOverlap(KDCoordinate o) { m_horizontalCellOverlap = o; }
|
||||
void setVerticalCellOverlap(KDCoordinate o) { m_verticalCellOverlap = o; }
|
||||
|
||||
void scrollToCell(int i, int j) const;
|
||||
void reloadCellAtLocation(int i, int j);
|
||||
HighlightCell * cellAtLocation(int i, int j);
|
||||
TableViewDataSource * dataSource();
|
||||
@@ -42,6 +41,7 @@ protected:
|
||||
int columnsScrollingOffset() const;
|
||||
int numberOfDisplayableRows() const;
|
||||
int numberOfDisplayableColumns() const;
|
||||
KDRect cellFrame(int i, int j) const;
|
||||
void layoutSubviews() override;
|
||||
protected:
|
||||
#if ESCHER_VIEW_LOGGING
|
||||
@@ -54,9 +54,6 @@ protected:
|
||||
int numberOfSubviews() const override;
|
||||
View * subviewAtIndex(int index) override;
|
||||
|
||||
/* realCellWidth enables to handle list view for which
|
||||
* TableViewDataSource->cellWidht = 0 */
|
||||
KDRect cellFrame(int i, int j) const;
|
||||
/* These two methods transform an index (of subview for instance) into
|
||||
* coordinates that refer to the data source entire table */
|
||||
int absoluteColumnNumberFromSubviewIndex(int index) const;
|
||||
|
||||
@@ -20,7 +20,7 @@ TableViewDataSource * TableView::dataSource() {
|
||||
// This method computes the minimal scrolling needed to properly display the
|
||||
// requested cell.
|
||||
void TableView::scrollToCell(int i, int j) {
|
||||
m_contentView.scrollToCell(i, j);
|
||||
scrollToContentRect(m_contentView.cellFrame(i, j), true);
|
||||
}
|
||||
|
||||
HighlightCell * TableView::cellAtLocation(int i, int j) {
|
||||
@@ -96,10 +96,6 @@ KDCoordinate TableView::ContentView::width() const {
|
||||
return result ? result : m_tableView->maxContentWidthDisplayableWithoutScrolling();
|
||||
}
|
||||
|
||||
void TableView::ContentView::scrollToCell(int x, int y) const {
|
||||
m_tableView->scrollToContentRect(cellFrame(x, y), true);
|
||||
}
|
||||
|
||||
void TableView::ContentView::reloadCellAtLocation(int i, int j) {
|
||||
HighlightCell * cell = cellAtLocation(i, j);
|
||||
if (cell) {
|
||||
|
||||
Reference in New Issue
Block a user