diff --git a/src/modules/partition/core/DeviceModel.cpp b/src/modules/partition/core/DeviceModel.cpp index 36e7ab03e..45de84d52 100644 --- a/src/modules/partition/core/DeviceModel.cpp +++ b/src/modules/partition/core/DeviceModel.cpp @@ -1,6 +1,7 @@ /* === This file is part of Calamares - === * * Copyright 2014, Aurélien Gâteau + * Copyright 2014, Teo Mrnjavac * * Calamares is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,12 +20,16 @@ #include +#include "utils/CalamaresUtilsGui.h" + // CalaPM #include // KF5 #include +#include + // STL #include @@ -67,6 +72,7 @@ DeviceModel::data( const QModelIndex& index, int role ) const switch ( role ) { case Qt::DisplayRole: + case Qt::ToolTipRole: if ( device->name().isEmpty() ) return device->deviceNode(); else @@ -74,6 +80,11 @@ DeviceModel::data( const QModelIndex& index, int role ) const .arg( device->name() ) .arg( KFormat().formatByteSize( device->capacity() ) ) .arg( device->deviceNode() ); + case Qt::DecorationRole: + return CalamaresUtils::defaultPixmap( CalamaresUtils::Partitions, + CalamaresUtils::Original, + QSize( CalamaresUtils::defaultIconSize().width() * 3, + CalamaresUtils::defaultIconSize().height() * 3 ) ); default: return QVariant(); }