mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-12 07:16:19 -05:00
Added Qt dependent macro for QFontMetrics::horizontalAdvance/width
This commit is contained in:
parent
fad7774767
commit
fce618f2aa
17 changed files with 66 additions and 48 deletions
|
|
@ -30,6 +30,7 @@
|
|||
|
||||
#include "DLListDelegate.h"
|
||||
#include "util/DateTime.h"
|
||||
#include "util/RsQtVersion.h"
|
||||
|
||||
Q_DECLARE_METATYPE(FileProgressInfo)
|
||||
|
||||
|
|
@ -278,7 +279,7 @@ void DLListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
|
|||
|
||||
QSize DLListDelegate::sizeHint(const QStyleOptionViewItem & option, const QModelIndex & index) const
|
||||
{
|
||||
float w = QFontMetricsF(option.font).width(index.data(Qt::DisplayRole).toString());
|
||||
float w = QFontMetrics_horizontalAdvance(QFontMetricsF(option.font), index.data(Qt::DisplayRole).toString());
|
||||
|
||||
int S = QFontMetricsF(option.font).height()*1.5 ;
|
||||
return QSize(w,S);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue