add alignment for backgroundcolumn

pull/11/head
Michail Vourlakos 5 years ago
parent 22a9416583
commit 300f4a364f

@ -40,7 +40,7 @@ HeaderView::HeaderView(Qt::Orientation orientation, QWidget *parent)
}
void HeaderView::paintSection(QPainter *painter, const QRect &rect, int logicalIndex) const
{
{
if (logicalIndex == Model::Layouts::BACKGROUNDCOLUMN) {
QString text = model()->headerData(Model::Layouts::BACKGROUNDCOLUMN, Qt::Horizontal, Qt::DisplayRole).toString();
QIcon icon = model()->headerData(Model::Layouts::BACKGROUNDCOLUMN, Qt::Horizontal, Qt::DecorationRole).value<QIcon>();

@ -234,6 +234,8 @@ QVariant Layouts::headerData(int section, Qt::Orientation orientation, int role)
return QString("");
} else if (role == Qt::DecorationRole) {
return QIcon::fromTheme("games-config-background");
} else if (role == Qt::TextAlignmentRole ){
return QVariant::fromValue(Qt::AlignHCenter | Qt::AlignVCenter);
}
break;
case NAMECOLUMN:

Loading…
Cancel
Save