Better handling of default sizes on the Cylinder and Weight widgets

Better handling of default sizes on the Cylinder and weight widgets,
the weigth widget didn't had a CSS applied so it looked odd compared
to the cylinder one, also the default behavior for the combobox delegate
didn't worked very well with the css applied, being too small.
this patch fixes that.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-06-16 12:33:27 -03:00
parent 349a084496
commit f9b4c6b889
6 changed files with 57 additions and 4 deletions

View file

@ -68,7 +68,7 @@ QVariant CylindersModel::data(const QModelIndex& index, int role) const
ret = defaultModelFont();
break;
case Qt::TextAlignmentRole:
ret = Qt::AlignRight;
ret = Qt::AlignHCenter;
break;
case Qt::DisplayRole:
case Qt::EditRole:
@ -656,6 +656,10 @@ QVariant TankInfoModel::data(const QModelIndex& index, int role) const
if (!index.isValid()) {
return ret;
}
if (role == Qt::FontRole){
return defaultModelFont();
}
struct tank_info *info = &tank_info[index.row()];
int ml = info->ml;