mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-08-03 12:46:29 -04:00
fixup! Another way of positioning suggestion icon & text
This commit is contained in:
parent
b4a13a7bc0
commit
e28a761c64
@ -37,6 +37,9 @@ QVariant SuggestionListModel::data(const QModelIndex &index, int role) const
|
||||
if (row < 0 || row >= rowCount())
|
||||
return QVariant();
|
||||
|
||||
if ( role == Qt::UserRole )
|
||||
return m_suggestions.at(row).url;
|
||||
|
||||
if ( index.column() == 0 && role == Qt::DecorationRole )
|
||||
{
|
||||
const auto library = KiwixApp::instance()->getLibrary();
|
||||
@ -51,8 +54,6 @@ QVariant SuggestionListModel::data(const QModelIndex &index, int role) const
|
||||
case Qt::DisplayRole:
|
||||
case Qt::EditRole:
|
||||
return m_suggestions.at(row).text;
|
||||
case Qt::UserRole:
|
||||
return m_suggestions.at(row).url;
|
||||
case Qt::SizeHintRole:
|
||||
{
|
||||
/* Padding in css can't change height, we have to achieve padding
|
||||
|
Loading…
x
Reference in New Issue
Block a user