Fix search placeholder text when navigating back in list style devices.
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
22. When pressing play after pressing stop, start playing at current song -
|
||||
don't start at begining of play queue.
|
||||
23. Better repeat and consume icons.
|
||||
24. Fix search placeholder text when navigating back in list style devices.
|
||||
|
||||
0.3.0
|
||||
-----
|
||||
|
||||
@@ -510,17 +510,17 @@ void ItemView::setLevel(int l, bool haveChildren)
|
||||
if (0==currentLevel) {
|
||||
listSearch->setPlaceholderText(i18n("Search %1...", topText));
|
||||
} else if (prev>currentLevel) {
|
||||
listSearch->setPlaceholderText(prevText);
|
||||
listSearch->setPlaceholderText(prevText[currentLevel]);
|
||||
} else {
|
||||
prevText=listSearch->placeholderText();
|
||||
prevText.insert(prev, listSearch->placeholderText());
|
||||
}
|
||||
#else
|
||||
if (0==currentLevel) {
|
||||
listSearch->setPlaceholderText(tr("Search %1...").arg(topText));
|
||||
} else if (prev>currentLevel) {
|
||||
listSearch->setPlaceholderText(prevText);
|
||||
listSearch->setPlaceholderText(prevText[currentLevel]);
|
||||
} else {
|
||||
prevText=listSearch->placeholderText();
|
||||
prevText.insert(prev, listSearch->placeholderText());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -25,13 +25,14 @@
|
||||
#define ITEMVIEW_H
|
||||
|
||||
#include "ui_itemview.h"
|
||||
class QAction;
|
||||
#include <QtCore/QMap>
|
||||
|
||||
#ifdef ENABLE_KDE_SUPPORT
|
||||
class KPixmapSequenceOverlayPainter;
|
||||
#endif
|
||||
|
||||
class ProxyModel;
|
||||
class QAction;
|
||||
class QTimer;
|
||||
|
||||
class ItemView : public QWidget, public Ui::ItemView
|
||||
@@ -108,7 +109,7 @@ private:
|
||||
int currentLevel;
|
||||
Mode mode;
|
||||
QString topText;
|
||||
QString prevText;
|
||||
QMap<int, QString> prevText;
|
||||
QModelIndex prevTopIndex;
|
||||
QSize iconGridSize;
|
||||
QSize listGridSize;
|
||||
|
||||
Reference in New Issue
Block a user