Some visual tweaking.

This commit is contained in:
Martin Rotter 2014-09-11 11:11:52 +02:00
parent 6e8bfdb1f2
commit 764f61e718
2 changed files with 12 additions and 1 deletions

View File

@ -18,9 +18,10 @@ Added:
Changed:
<ul>
<li>Selection in feed list is now single.</li>
<li>Keyboard navigation to "next/previous" item in feed list is now recursively hybrid.</li>
</ul>
<hr/>
<center><h2>2.0.0.0</h2></center>

View File

@ -460,6 +460,10 @@ void FeedsView::updateCountsOfParticularFeed(FeedsModelFeed *feed,
}
void FeedsView::selectNextItem() {
if (!isExpanded(currentIndex())) {
expand(currentIndex());
}
QModelIndex index_next = moveCursor(QAbstractItemView::MoveDown, Qt::NoModifier);
if (index_next.isValid()) {
@ -471,6 +475,12 @@ void FeedsView::selectNextItem() {
void FeedsView::selectPreviousItem() {
QModelIndex index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier);
if (!isExpanded(index_previous)) {
expand(index_previous);
}
index_previous = moveCursor(QAbstractItemView::MoveUp, Qt::NoModifier);
if (index_previous.isValid()) {
setCurrentIndex(index_previous);
selectionModel()->select(index_previous, QItemSelectionModel::Select | QItemSelectionModel::Rows);