Skip to content

Commit

Permalink
fix for mobile layout issues on mobile (#1314)
Browse files Browse the repository at this point in the history
  • Loading branch information
ggurdin authored Dec 27, 2024
1 parent 1317989 commit 78ce090
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 42 deletions.
29 changes: 17 additions & 12 deletions lib/pangea/widgets/practice_activity/multiple_choice_activity.dart
Original file line number Diff line number Diff line change
Expand Up @@ -243,17 +243,22 @@ class MultipleChoiceActivityState extends State<MultipleChoiceActivity> {
],
);

return ConstrainedBox(
constraints: const BoxConstraints(
maxWidth: AppConfig.toolbarMinWidth,
maxHeight: AppConfig.toolbarMaxHeight,
),
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20),
child: content,
),
),
);
return practiceActivity.activityType == ActivityTypeEnum.hiddenWordListening
? ConstrainedBox(
constraints: const BoxConstraints(
maxWidth: AppConfig.toolbarMinWidth,
maxHeight: AppConfig.toolbarMaxHeight,
),
child: SingleChildScrollView(
child: Padding(
padding: const EdgeInsets.all(20),
child: content,
),
),
)
: Padding(
padding: const EdgeInsets.all(20),
child: content,
);
}
}
52 changes: 22 additions & 30 deletions lib/pangea/widgets/word_zoom/word_zoom_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -239,26 +239,23 @@ class WordZoomWidgetState extends State<WordZoomWidget> {
),
),
if (_activityType != null)
Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
if (_showActivityCard(_activityType))
PracticeActivityCard(
pangeaMessageEvent: widget.messageEvent,
targetTokensAndActivityType:
TargetTokensAndActivityType(
tokens: [widget.token],
activityType: _activityType!,
),
overlayController: widget.overlayController,
morphFeature: _selectedMorphFeature,
wordDetailsController: this,
)
else
_activityAnswer,
],
)
if (_showActivityCard(_activityType))
PracticeActivityCard(
pangeaMessageEvent: widget.messageEvent,
targetTokensAndActivityType: TargetTokensAndActivityType(
tokens: [widget.token],
activityType: _activityType!,
),
overlayController: widget.overlayController,
morphFeature: _selectedMorphFeature,
wordDetailsController: this,
)
else
Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [_activityAnswer],
)
else
ContextualTranslationWidget(
token: widget.token,
Expand All @@ -269,16 +266,11 @@ class WordZoomWidgetState extends State<WordZoomWidget> {
definition: _definition,
setDefinition: _setDefinition,
),
Row(
mainAxisSize: MainAxisSize.min,
children: [
MorphologicalListWidget(
token: widget.token,
setMorphFeature: _setSelectedMorphFeature,
selectedMorphFeature: _selectedMorphFeature,
completedActivities: completedMorphActivities,
),
],
MorphologicalListWidget(
token: widget.token,
setMorphFeature: _setSelectedMorphFeature,
selectedMorphFeature: _selectedMorphFeature,
completedActivities: completedMorphActivities,
),
],
),
Expand Down

0 comments on commit 78ce090

Please sign in to comment.