[Fix #6] Increase Font size for basket view

This commit is contained in:
Martin Brodbeck 2018-10-08 09:39:24 +02:00
parent 337462f010
commit 42a1a3151f
2 changed files with 9 additions and 3 deletions

View file

@ -20,16 +20,21 @@ QVariant BasketModel::data(const QModelIndex& index, int role) const
{
if (role == Qt::FontRole) {
QFont myFont;
myFont.setPointSize(14);
QFont myFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
myFixedFont.setPointSize(14);
switch (index.column()) {
case 0:
[[fallthrough]];
case 1:
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
myFixedFont.setPointSize(11);
return myFixedFont;
case 2:
return myFont;
return myFixedFont;
case 3:
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
return myFixedFont;
}
}

View file

@ -260,6 +260,7 @@ void MainWindow::checkSellerNo(bool ctrlPressed)
int price = priceDialog.getPrice();
std::string desc = priceDialog.getDescription();
dynamic_cast<BasketModel*>(ui_.basketView->model())->addArticle(seller, price, desc);
ui_.basketView->resizeColumnToContents(1);
ui_.basketSumLabel->setText(marketplace_->getBasketSumAsString().c_str());
}
}