shorten tooltips

This commit is contained in:
Martin Rotter 2021-11-16 08:53:17 +01:00
parent 59bcdd5d35
commit c6ae122777
2 changed files with 3 additions and 1 deletions

View File

@ -352,7 +352,8 @@ QVariant MessagesModel::data(const QModelIndex& idx, int role) const {
return data(idx, Qt::ItemDataRole::EditRole);
}
else {
return data(idx, Qt::ItemDataRole::DisplayRole);
return TextFactory::shorten(data(idx, Qt::ItemDataRole::DisplayRole).toString(),
TEXT_TOOLTIP_LIMIT);
}
}
}

View File

@ -56,6 +56,7 @@
#define URL_REGEXP "^(http|https|feed|ftp):\\/\\/[\\w\\-_]+(\\.[\\w\\-_]+)+([\\w\\-\\.,@?^=%&:/~\\+#]*[\\w\\-\\@?^=%&/~\\+#])?$"
#define SCRIPT_SOURCE_TYPE_REGEXP "^.+#.*$"
#define TEXT_TITLE_LIMIT 30
#define TEXT_TOOLTIP_LIMIT 50
#define LOWER_TITLE_ROLE 64
#define RESELECT_MESSAGE_THRESSHOLD 500
#define ICON_SIZE_SETTINGS 16