[Fix #6] Increase Font size for basket view
This commit is contained in:
parent
337462f010
commit
42a1a3151f
2 changed files with 9 additions and 3 deletions
|
@ -20,16 +20,21 @@ QVariant BasketModel::data(const QModelIndex& index, int role) const
|
||||||
{
|
{
|
||||||
if (role == Qt::FontRole) {
|
if (role == Qt::FontRole) {
|
||||||
QFont myFont;
|
QFont myFont;
|
||||||
|
myFont.setPointSize(14);
|
||||||
|
|
||||||
|
QFont myFixedFont = QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
||||||
|
myFixedFont.setPointSize(14);
|
||||||
|
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case 0:
|
case 0:
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
case 1:
|
case 1:
|
||||||
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
myFixedFont.setPointSize(11);
|
||||||
|
return myFixedFont;
|
||||||
case 2:
|
case 2:
|
||||||
return myFont;
|
return myFixedFont;
|
||||||
case 3:
|
case 3:
|
||||||
return QFontDatabase::systemFont(QFontDatabase::FixedFont);
|
return myFixedFont;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -260,6 +260,7 @@ void MainWindow::checkSellerNo(bool ctrlPressed)
|
||||||
int price = priceDialog.getPrice();
|
int price = priceDialog.getPrice();
|
||||||
std::string desc = priceDialog.getDescription();
|
std::string desc = priceDialog.getDescription();
|
||||||
dynamic_cast<BasketModel*>(ui_.basketView->model())->addArticle(seller, price, desc);
|
dynamic_cast<BasketModel*>(ui_.basketView->model())->addArticle(seller, price, desc);
|
||||||
|
ui_.basketView->resizeColumnToContents(1);
|
||||||
ui_.basketSumLabel->setText(marketplace_->getBasketSumAsString().c_str());
|
ui_.basketSumLabel->setText(marketplace_->getBasketSumAsString().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue