mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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
2 changed files with 9 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue