Summary: | Normal view mode: retain context in article list pane | ||
---|---|---|---|
Product: | [Applications] akregator | Reporter: | Alexandra Walford <alexandra> |
Component: | general | Assignee: | kdepim bugs <kdepim-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Alexandra Walford
2005-06-17 01:53:46 UTC
> Behaviour similar to that of kmail (where the selected message is kept in
> the middle of the message list) would be nice (and consistent).
I agree, that behaviour definitely makes more sense. Right now, there is no "lookahead" possible at all when iterating over items.
SVN commit 482225 by osterfeld: center current article when browsing the list, so one can look ahead what articles coming while browsing using next/prev article shortcuts. BUG: 107568 M +19 -6 articlelistview.cpp --- trunk/KDE/kdepim/akregator/src/articlelistview.cpp #482224:482225 @@ -62,9 +62,21 @@ class ArticleListView::ArticleListViewPrivate { public: + + ArticleListViewPrivate(ArticleListView* parent) : m_parent(parent) { } + + void ensureCurrentItemVisible() + { + if (m_parent->currentItem()) + { + m_parent->center( m_parent->contentsX(), m_parent->itemPos(m_parent->currentItem()), 0, 9.0 ); + } + } + + ArticleListView* m_parent; + /** maps article to article item */ QMap<Article, ArticleItem*> articleMap; - TreeNode* node; Akregator::Filters::ArticleMatcher textFilter; Akregator::Filters::ArticleMatcher statusFilter; @@ -204,8 +216,9 @@ /* ==================================================================================== */ ArticleListView::ArticleListView(QWidget *parent, const char *name) - : KListView(parent), d (new ArticleListViewPrivate) + : KListView(parent) { + d = new ArticleListViewPrivate(this); setObjectName(name); d->noneSelected = true; d->node = 0; @@ -528,7 +541,7 @@ clearSelection(); setSelected(d->articleMap[a], true); setCurrentItem(d->articleMap[a]); - ensureItemVisible(d->articleMap[a]); + d->ensureCurrentItemVisible(); } } @@ -546,7 +559,7 @@ clearSelection(); setSelected(d->articleMap[a], true); setCurrentItem(d->articleMap[a]); - ensureItemVisible(d->articleMap[a]); + d->ensureCurrentItemVisible(); } } @@ -576,7 +589,7 @@ setCurrentItem(d->articleMap[a]); clearSelection(); setSelected(d->articleMap[a], true); - ensureItemVisible(d->articleMap[a]); + d->ensureCurrentItemVisible(); } } @@ -606,7 +619,7 @@ setCurrentItem(d->articleMap[a]); clearSelection(); setSelected(d->articleMap[a], true); - ensureItemVisible(d->articleMap[a]); + d->ensureCurrentItemVisible(); } } SVN commit 482228 by osterfeld: backport of #107568: center current article when browsing the list CCBUG: 107568 M +19 -6 articlelistview.cpp --- branches/KDE/3.5/kdepim/akregator/src/articlelistview.cpp #482227:482228 @@ -59,9 +59,21 @@ class ArticleListView::ArticleListViewPrivate { public: + + ArticleListViewPrivate(ArticleListView* parent) : m_parent(parent) { } + + void ensureCurrentItemVisible() + { + if (m_parent->currentItem()) + { + m_parent->center( m_parent->contentsX(), m_parent->itemPos(m_parent->currentItem()), 0, 9.0 ); + } + } + + ArticleListView* m_parent; + /** maps article to article item */ QMap<Article, ArticleItem*> articleMap; - TreeNode* node; Akregator::Filters::ArticleMatcher textFilter; Akregator::Filters::ArticleMatcher statusFilter; @@ -201,8 +213,9 @@ /* ==================================================================================== */ ArticleListView::ArticleListView(QWidget *parent, const char *name) - : KListView(parent, name), d (new ArticleListViewPrivate) + : KListView(parent, name) { + d = new ArticleListViewPrivate(this); d->noneSelected = true; d->node = 0; d->columnMode = ArticleListViewPrivate::feedMode; @@ -524,7 +537,7 @@ clearSelection(); setSelected(d->articleMap[a], true); setCurrentItem(d->articleMap[a]); - ensureItemVisible(d->articleMap[a]); + d->ensureCurrentItemVisible(); } } @@ -542,7 +555,7 @@ clearSelection(); setSelected(d->articleMap[a], true); setCurrentItem(d->articleMap[a]); - ensureItemVisible(d->articleMap[a]); + d->ensureCurrentItemVisible(); } } @@ -572,7 +585,7 @@ setCurrentItem(d->articleMap[a]); clearSelection(); setSelected(d->articleMap[a], true); - ensureItemVisible(d->articleMap[a]); + d->ensureCurrentItemVisible(); } } @@ -602,7 +615,7 @@ setCurrentItem(d->articleMap[a]); clearSelection(); setSelected(d->articleMap[a], true); - ensureItemVisible(d->articleMap[a]); + d->ensureCurrentItemVisible(); } } |