Use the correct font for the Air Types Model.
The air types model had a font bigger than the other models, this patch creates a data() method that correctly delivers the correct font. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
96d5687ab8
commit
a07c3d62af
@ -1683,3 +1683,11 @@ void GasSelectionModel::repopulate()
|
||||
{
|
||||
setStringList(DivePlannerPointsModel::instance()->getGasList());
|
||||
}
|
||||
|
||||
QVariant GasSelectionModel::data(const QModelIndex& index, int role) const
|
||||
{
|
||||
if(role == Qt::FontRole){
|
||||
return defaultModelFont();
|
||||
}
|
||||
return QStringListModel::data(index, role);
|
||||
}
|
||||
|
||||
@ -304,6 +304,7 @@ class GasSelectionModel : public QStringListModel{
|
||||
public:
|
||||
static GasSelectionModel* instance();
|
||||
Qt::ItemFlags flags(const QModelIndex& index) const;
|
||||
virtual QVariant data(const QModelIndex& index, int role) const;
|
||||
public slots:
|
||||
void repopulate();
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user