Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion designer_v2/lib/common_views/primary_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class PrimaryButton extends StatefulWidget {
horizontal: 4.0,
vertical: 8.0,
),
this.iconTextSpacing = 6.0,
this.minimumSize,
super.key,
});
Expand All @@ -41,6 +42,7 @@ class PrimaryButton extends StatefulWidget {
final FutureFactory? onPressedFuture;

final EdgeInsets innerPadding;
final double iconTextSpacing;

bool get isDisabled =>
!enabled || (onPressed == null && onPressedFuture == null);
Expand Down Expand Up @@ -112,7 +114,7 @@ class _PrimaryButtonState extends State<PrimaryButton> {
)
else
Icon(widget.icon),
const SizedBox(width: 6.0),
SizedBox(width: widget.iconTextSpacing),
Text(widget.text, textAlign: TextAlign.center),
],
),
Expand Down
8 changes: 7 additions & 1 deletion designer_v2/lib/features/dashboard/dashboard_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
Row(
children: [
SizedBox(
height: 36.0, // Fixed height for alignment
height: 30.0,
child: MediaQuery.of(context).size.width < 500
? IconButton.filled(
icon: const Icon(Icons.add),
Expand All @@ -222,6 +222,12 @@ class _DashboardScreenState extends ConsumerState<DashboardScreen> {
: PrimaryButton(
text: tr.action_button_new_study,
onPressed: controller.onClickNewStudy,
minimumSize: const Size(0, 30),
innerPadding: const EdgeInsets.symmetric(
horizontal: 6,
vertical: 0,
),
iconTextSpacing: 14,
),
),
const SizedBox(width: 20.0),
Expand Down
Loading