Skip to content

Commit

Permalink
Fixed padding for full screen devices
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskokoska committed Jan 10, 2024
1 parent 74634b2 commit 115b14f
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 49 deletions.
80 changes: 44 additions & 36 deletions budget/lib/pages/addBudgetPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,9 @@ class _AddBudgetPageState extends State<AddBudgetPage> {
centered: true,
children: [
Padding(
padding: const EdgeInsets.symmetric(horizontal: 13),
padding: EdgeInsets.symmetric(
horizontal:
13 + getHorizontalPaddingConstrained(context)),
child: IncomeExpenseTabSelector(
onTabChanged: setSelectedIncome,
initialTabIsIncome: selectedIncome,
Expand Down Expand Up @@ -809,41 +811,47 @@ class _AddBudgetPageState extends State<AddBudgetPage> {
child: widget.budget == null
? SizedBox.shrink()
: Padding(
padding: const EdgeInsets.only(
left: 20,
right: 20,
bottom: 15,
),
child: Button(
flexibleLayout: true,
icon: appStateSettings["outlinedIcons"]
? Icons.fact_check_outlined
: Icons.fact_check_rounded,
label: widget.budget?.income == true
? "set-saving-goals".tr()
: "set-spending-goals".tr(),
onTap: () async {
Budget budget = await createBudget();
pushRoute(
context,
StreamBuilder<Budget>(
stream:
database.getBudget(widget.budget!.budgetPk),
builder: (context, snapshot) {
if (snapshot.data == null)
return SizedBox.shrink();
return EditBudgetLimitsPage(
budget: budget,
currentIsAbsoluteSpendingLimit:
snapshot.data!.isAbsoluteSpendingLimit,
);
},
),
);
},
color: Theme.of(context).colorScheme.secondaryContainer,
textColor:
Theme.of(context).colorScheme.onSecondaryContainer,
padding: EdgeInsets.symmetric(
horizontal: getHorizontalPaddingConstrained(context)),
child: Padding(
padding: const EdgeInsets.only(
left: 20,
right: 20,
bottom: 15,
),
child: Button(
flexibleLayout: true,
icon: appStateSettings["outlinedIcons"]
? Icons.fact_check_outlined
: Icons.fact_check_rounded,
label: widget.budget?.income == true
? "set-saving-goals".tr()
: "set-spending-goals".tr(),
onTap: () async {
Budget budget = await createBudget();
pushRoute(
context,
StreamBuilder<Budget>(
stream:
database.getBudget(widget.budget!.budgetPk),
builder: (context, snapshot) {
if (snapshot.data == null)
return SizedBox.shrink();
return EditBudgetLimitsPage(
budget: budget,
currentIsAbsoluteSpendingLimit:
snapshot.data!.isAbsoluteSpendingLimit,
);
},
),
);
},
color:
Theme.of(context).colorScheme.secondaryContainer,
textColor: Theme.of(context)
.colorScheme
.onSecondaryContainer,
),
),
),
),
Expand Down
31 changes: 19 additions & 12 deletions budget/lib/pages/walletDetailsPage.dart
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,8 @@ class _WalletDetailsPageState extends State<WalletDetailsPage>
),
if (widget.wallet != null)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 13),
padding: EdgeInsets.symmetric(
horizontal: 13 + getHorizontalPaddingConstrained(context)),
child: Column(
children: [
Padding(
Expand Down Expand Up @@ -913,11 +914,8 @@ class _WalletDetailsPageState extends State<WalletDetailsPage>
padding: const EdgeInsets.only(bottom: 13, left: 13, right: 13),
child: Padding(
padding: EdgeInsets.symmetric(
horizontal: getHorizontalPaddingConstrained(
context,
enabled: enableDoubleColumn(context) == false &&
widget.wallet == null,
)),
horizontal: getHorizontalPaddingConstrained(context),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
Expand Down Expand Up @@ -1330,10 +1328,18 @@ class _WalletDetailsPageState extends State<WalletDetailsPage>
sliverAppBar,
if (widget.wallet != null)
SliverToBoxAdapter(
child: Padding(
padding: EdgeInsets.symmetric(
horizontal:
getHorizontalPaddingConstrained(
context),
),
child: Padding(
padding: const EdgeInsets.only(top: 8),
child: totalNetContainer,
)),
padding: const EdgeInsets.only(top: 8),
child: totalNetContainer,
),
),
),
if (widget.wallet == null)
SliverToBoxAdapter(
child: tabDateFilterSelectorHeader),
Expand Down Expand Up @@ -1797,7 +1803,8 @@ class _WalletCategoryPieChartState extends State<WalletCategoryPieChart> {
padding: EdgeInsets.symmetric(
horizontal: getHorizontalPaddingConstrained(
context,
enabled: enableDoubleColumn(context) == false,
enabled: enableDoubleColumn(context) == false ||
widget.isAllSpending == false,
)),
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 13),
Expand Down Expand Up @@ -1857,8 +1864,8 @@ class _WalletCategoryPieChartState extends State<WalletCategoryPieChart> {
categoryEntries.add(
CategoryEntry(
useHorizontalPaddingConstrained:
enableDoubleColumn(context) == false &&
widget.isAllSpending,
enableDoubleColumn(context) == false ||
widget.isAllSpending == false,
selectedSubCategoryPk: selectedCategory?.categoryPk,
expandSubcategories: showAllSubcategories ||
category.category.categoryPk ==
Expand Down
2 changes: 2 additions & 0 deletions budget/lib/widgets/showChangelog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import 'listItem.dart';

String getChangelogString() {
return """
< 5.1.6
Fixed padding for full screen devices
< 5.1.5
Fixed title searching with category name when adding a transaction (title has priority)
Fixed wallet details page swipe to dismiss header
Expand Down
2 changes: 1 addition & 1 deletion budget/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 5.1.5+298
version: 5.1.6+299

environment:
sdk: ">= 3.0.0"
Expand Down

0 comments on commit 115b14f

Please sign in to comment.