Skip to content

Commit

Permalink
[#204] [CR] Drop Custom Date/Time Pickers. Fix right indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lyskouski committed Sep 26, 2023
1 parent 615bce4 commit 7e430e7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
6 changes: 4 additions & 2 deletions lib/_configs/theme_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ class ThemeHelper {

static double getIndent([double multiply = 1]) => _Sizes.normal / AppZoom.state * multiply;

static double getWidth(BuildContext context, [double multiply = 4]) =>
MediaQuery.sizeOf(context).width / AppZoom.state - getIndent(multiply) - (isNavRight(context) ? 40 : 0);
static double getWidth(BuildContext context, [double multiply = 4, BoxConstraints? constraints]) =>
MediaQuery.sizeOf(context).width / AppZoom.state -
getIndent(multiply) -
(isNavRight(context, constraints) ? 40 : 0);

static double getHeight(BuildContext context, [double multiply = 2]) =>
MediaQuery.sizeOf(context).height / AppZoom.state - getIndent(multiply);
Expand Down
3 changes: 1 addition & 2 deletions lib/pages/bill/widgets/expenses_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,7 @@ class ExpensesTabState<T extends ExpensesTab> extends AbstractPageState<T> {
Widget buildContent(BuildContext context, BoxConstraints constraints) {
final TextTheme textTheme = context.textTheme;
double indent = ThemeHelper.getIndent(2);
double width = ThemeHelper.getWidth(context, 6);

double width = ThemeHelper.getWidth(context, 6, constraints);
return SingleChildScrollView(
controller: FocusController.getController(runtimeType),
child: Container(
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/bill/widgets/income_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ class IncomeTabState extends AbstractPageState<IncomeTab> {
Widget buildContent(BuildContext context, BoxConstraints constraints) {
final TextTheme textTheme = context.textTheme;
double indent = ThemeHelper.getIndent(2);
double width = ThemeHelper.getWidth(context, 6);
double width = ThemeHelper.getWidth(context, 6, constraints);

return SingleChildScrollView(
controller: FocusController.getController(runtimeType),
Expand Down
2 changes: 1 addition & 1 deletion lib/pages/bill/widgets/transfer_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class TransferTabState extends AbstractPageState<TransferTab> {
Widget buildContent(BuildContext context, BoxConstraints constraints) {
final TextTheme textTheme = context.textTheme;
double indent = ThemeHelper.getIndent(2);
double width = ThemeHelper.getWidth(context, 6);
double width = ThemeHelper.getWidth(context, 6, constraints);

return SingleChildScrollView(
controller: FocusController.getController(runtimeType),
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/form/list_account_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ListAccountSelectorState<K extends ListAccountSelectorItem> extends ListSe
color: item.item?.color ?? Colors.transparent,
icon: item.item?.icon ?? Icons.radio_button_unchecked_sharp,
hidden: item.item?.hidden ?? false,
width: widget.width - 32,
width: widget.width - 34,
showDivider: false,
);
}
Expand Down

0 comments on commit 7e430e7

Please sign in to comment.