fix: add padding inside morph choices scroll view (#1444)

pull/1593/head
ggurdin 10 months ago committed by GitHub
parent bab9287117
commit 986fdc1d5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -197,56 +197,60 @@ class MorphologicalCenterWidgetState extends State<MorphologicalCenterWidget> {
child: SingleChildScrollView( child: SingleChildScrollView(
controller: _scrollController, controller: _scrollController,
scrollDirection: Axis.vertical, scrollDirection: Axis.vertical,
child: Wrap( child: Padding(
alignment: WrapAlignment.center, padding: const EdgeInsets.symmetric(horizontal: 16),
children: allMorphTagsForEdit.map((tag) { child: Wrap(
return Container( alignment: WrapAlignment.center,
margin: const EdgeInsets.all(2), children: allMorphTagsForEdit.map((tag) {
padding: EdgeInsets.zero, return Container(
decoration: BoxDecoration( margin: const EdgeInsets.all(2),
borderRadius: const BorderRadius.all(Radius.circular(10)), padding: EdgeInsets.zero,
border: Border.all( decoration: BoxDecoration(
color: selectedMorphTag == tag borderRadius:
? Theme.of(context).colorScheme.primary const BorderRadius.all(Radius.circular(10)),
: Colors.transparent, border: Border.all(
style: BorderStyle.solid, color: selectedMorphTag == tag
width: 2.0, ? Theme.of(context).colorScheme.primary
), : Colors.transparent,
), style: BorderStyle.solid,
child: TextButton( width: 2.0,
style: ButtonStyle(
padding: WidgetStateProperty.all(
const EdgeInsets.symmetric(horizontal: 7),
), ),
backgroundColor: selectedMorphTag == tag ),
? WidgetStateProperty.all<Color>( child: TextButton(
Theme.of(context) style: ButtonStyle(
.colorScheme padding: WidgetStateProperty.all(
.primary const EdgeInsets.symmetric(horizontal: 7),
.withAlpha(50), ),
) backgroundColor: selectedMorphTag == tag
: null, ? WidgetStateProperty.all<Color>(
shape: WidgetStateProperty.all( Theme.of(context)
RoundedRectangleBorder( .colorScheme
borderRadius: BorderRadius.circular(10), .primary
.withAlpha(50),
)
: null,
shape: WidgetStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10),
),
), ),
), ),
onPressed: () {
setState(() => selectedMorphTag = tag);
},
child: Text(
getGrammarCopy(
category: widget.morphFeature,
lemma: tag,
context: context,
) ??
tag,
textAlign: TextAlign.center,
),
), ),
onPressed: () { );
setState(() => selectedMorphTag = tag); }).toList(),
}, ),
child: Text(
getGrammarCopy(
category: widget.morphFeature,
lemma: tag,
context: context,
) ??
tag,
textAlign: TextAlign.center,
),
),
);
}).toList(),
), ),
), ),
), ),

Loading…
Cancel
Save