diff --git a/ChangeLog b/ChangeLog index 5ba8c2c..1663916 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,12 @@ -v0.7 (01/01/2017) +v0.7 (04/02/2017) ** User ** - Set background calendar color to red or yellow when one account is negative or less than 200€ + Set background calendar color to red or yellow when one account is negative or less than 200€ (not displayed on hidden and virtual account) ** Dev ** ** Bugs ** Bug in expression parser, negative mark before parenthesis considered as positive. Bug in FormulaDelegate : string copy was made in a wrong way + Initial and final negative account values were not displayed in red v0.6 (08/10/2016) ** User ** diff --git a/src/view/AccountPanel.cpp b/src/view/AccountPanel.cpp index 6c8b2a7..8d60814 100644 --- a/src/view/AccountPanel.cpp +++ b/src/view/AccountPanel.cpp @@ -704,11 +704,13 @@ void AccountPanel::UpdateStats() if (mode == REAL_MODE) value -= (*virtuals)[accountIt->id]; _accountsGrid->item(i, ACCOUNT_INIT)->setText(v.sprintf("%.2lf", (double)value/100)); + _accountsGrid->item(i, ACCOUNT_INIT)->setForeground((value >= 0) ? QBrush(Qt::black) : QBrush(Qt::red)); value = curAccountAmounts[day][accountIt->id]; _accountsGrid->item(i, ACCOUNT_CUR)->setText(v.sprintf("%.2lf", (double)value/100)); _accountsGrid->item(i, ACCOUNT_CUR)->setForeground((value >= 0) ? QBrush(Qt::black) : QBrush(Qt::red)); value = finalAccountAmount[accountIt->id]; _accountsGrid->item(i, ACCOUNT_FINAL)->setText(v.sprintf("%.2lf", (double)value/100)); + _accountsGrid->item(i, ACCOUNT_FINAL)->setForeground((value >= 0) ? QBrush(Qt::black) : QBrush(Qt::red)); } else { @@ -716,11 +718,13 @@ void AccountPanel::UpdateStats() value2 = (*notChecked)[accountIt->id]; _accountsGrid->item(i, ACCOUNT_INIT)->setText(v.sprintf("%.2lf (%.2lf)", (double)value/100, (double)(value-value2)/100)); + _accountsGrid->item(i, ACCOUNT_INIT)->setForeground((value >= 0) ? QBrush(Qt::black) : QBrush(Qt::red)); value = curAccountAmounts[day][accountIt->id]; _accountsGrid->item(i, ACCOUNT_CUR)->setText(v.sprintf("%.2lf (%.2lf)", (double)value/100, (double)(value-value2)/100)); _accountsGrid->item(i, ACCOUNT_CUR)->setForeground((value >= 0) ? QBrush(Qt::black) : QBrush(Qt::red)); value = finalAccountAmount[accountIt->id]; _accountsGrid->item(i, ACCOUNT_FINAL)->setText(v.sprintf("%.2lf (%.2lf)", (double)value/100, (double)(value-value2)/100)); + _accountsGrid->item(i, ACCOUNT_FINAL)->setForeground((value >= 0) ? QBrush(Qt::black) : QBrush(Qt::red)); } } diff --git a/src/view/wxUI.cpp b/src/view/wxUI.cpp index 5672a34..0a25f9f 100644 --- a/src/view/wxUI.cpp +++ b/src/view/wxUI.cpp @@ -315,7 +315,7 @@ void wxUI::ChangeUser() void wxUI::OnButtonAbout() { - QMessageBox::information(0, "KissCount " APP_VERSION, _("Personal accounting software") + "\n\nhttp://indefero.soutade.fr/p/kisscount/\n\n" + _("Licenced under GNU GPL v3") + "\n\nCopyright (C) 2010-2015 Grégory Soutadé"); + QMessageBox::information(0, "KissCount " APP_VERSION, _("Personal accounting software") + "\n\nhttp://indefero.soutade.fr/p/kisscount/\n\n" + _("Licenced under GNU GPL v3") + "\n\nCopyright (C) 2010-2017 Grégory Soutadé"); } void wxUI::OnButtonQuit()