Skip to content

Commit

Permalink
Make alerts a bit wider
Browse files Browse the repository at this point in the history
They appeared quite cramped and with today's screen resolutions,
people tend to have wider windows.

Improved wording of "Don't use Income", Spending etc."-alert.
  • Loading branch information
humdingerb committed Jun 27, 2024
1 parent 096768b commit 6657626
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/CategoryBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ CategoryBox::Validate(void)
if (category == "") {
DAlert* alert = new DAlert(B_TRANSLATE("Category is missing"),
B_TRANSLATE("Do you really want to add this transaction without a category?\n\n"
"Even then, you need to select a transaction type, 'income' or 'spending'."),
"Even then, you need to select a transaction type, 'income' or 'spending'.\n"),
B_TRANSLATE("Income"), B_TRANSLATE("Spending"), B_TRANSLATE("Cancel"),
B_WIDTH_AS_USUAL, B_WARNING_ALERT);
int32 value = alert->Go();
Expand All @@ -107,8 +107,8 @@ CategoryBox::Validate(void)
|| category.ICompare(B_TRANSLATE_CONTEXT("Transfer", "CommonTerms")) == 0
|| category.ICompare(B_TRANSLATE_CONTEXT("Uncategorized", "CommonTerms")) == 0) {
ShowAlert(B_TRANSLATE("Can't use this category name"), B_TRANSLATE(
"CapitalBe uses the words 'Income', 'Spending', 'Split', 'Transfer', and "
"'Uncategorized' for managing categories, so you can't use them as category names.\n"
"CapitalBe uses 'Income', 'Spending', 'Split', 'Transfer', and 'Uncategorized' "
"for managing accounts, so you can't use them as category names.\n\n"
"Please choose a different name for your new category."));
return false;
}
Expand Down
5 changes: 2 additions & 3 deletions src/CategoryWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,8 @@ CategoryView::MessageReceived(BMessage* msg)
|| name.ICompare(B_TRANSLATE_CONTEXT("Transfer", "CommonTerms")) == 0
|| name.ICompare(B_TRANSLATE_CONTEXT("Uncategorized", "CommonTerms")) == 0) {
ShowAlert(B_TRANSLATE("Can't use this category name"),B_TRANSLATE(
"CapitalBe uses the words 'Income', 'Spending', 'Split', 'Transfer', and "
"'Uncategorized' for managing categories, so you can't use them as category "
"names.\n"
"CapitalBe uses 'Income', 'Spending', 'Split', 'Transfer', and 'Uncategorized' "
"for managing accounts, so you can't use them as category names.\n\n"
"Please choose a different name for your new category."));
break;
}
Expand Down
4 changes: 2 additions & 2 deletions src/DAlert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#endif

// Default size of the Alert window.
#define DEFAULT_RECT BRect(0, 0, 310, 75)
#define DEFAULT_RECT BRect(0, 0, 450, 75)
#define max(LHS, RHS) ((LHS) > (RHS) ? (LHS) : (RHS))

// Globals ---------------------------------------------------------------------
Expand All @@ -76,7 +76,7 @@ static const int kButtonLeftOffset = 62;
static const int kButtonUsualWidth = 75;

static const int kWindowIconOffset = 27;
static const int kWindowMinWidth = 310;
static const int kWindowMinWidth = 450;
static const int kWindowMinOffset = 12;
static const int kWindowOffsetMinWidth = 335;

Expand Down

0 comments on commit 6657626

Please sign in to comment.