fix: tweak card appearances (#296)

* fix: tweak card appearances

* Update patch_selector_card.dart
This commit is contained in:
afn 2022-09-25 08:43:37 -04:00 committed by GitHub
parent db18874ea1
commit 7ecf951bfb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 31 deletions

View File

@ -33,7 +33,7 @@ class _ContributorsCardState extends State<ContributorsCard> {
'', '',
style: TextStyle( style: TextStyle(
fontSize: 20, fontSize: 20,
fontWeight: FontWeight.w600, fontWeight: FontWeight.w500,
), ),
), ),
), ),

View File

@ -49,7 +49,7 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
), ),
], ],
), ),
const SizedBox(height: 8), const SizedBox(height: 4),
Row( Row(
children: <Widget>[ children: <Widget>[
I18nText('latestCommitCard.managerLabel'), I18nText('latestCommitCard.managerLabel'),

View File

@ -32,7 +32,7 @@ class AppSelectorCard extends StatelessWidget {
), ),
), ),
), ),
const SizedBox(height: 10), const SizedBox(height: 8),
locator<PatcherViewModel>().selectedApp == null locator<PatcherViewModel>().selectedApp == null
? I18nText('appSelectorCard.widgetSubtitle') ? I18nText('appSelectorCard.widgetSubtitle')
: Row( : Row(
@ -49,21 +49,21 @@ class AppSelectorCard extends StatelessWidget {
), ),
), ),
const SizedBox(width: 6), const SizedBox(width: 6),
Text(locator<PatcherViewModel>().getAppSelectionString()), Text(
locator<PatcherViewModel>()
.getAppSelectionString(),
style: const TextStyle(fontWeight: FontWeight.w600),
),
], ],
), ),
locator<PatcherViewModel>().selectedApp == null locator<PatcherViewModel>().selectedApp == null
? Container() ? Container()
: Column( : Column(
children: [ children: [
const SizedBox(height: 10), const SizedBox(height: 4),
Padding( Text(
padding: const EdgeInsets.only(left: 20), locator<PatcherViewModel>()
child: Text( .getRecommendedVersionString(context),
locator<PatcherViewModel>()
.getRecommendedVersionString(context),
style: const TextStyle(fontStyle: FontStyle.italic),
),
), ),
], ],
), ),

View File

@ -32,7 +32,7 @@ class PatchSelectorCard extends StatelessWidget {
), ),
), ),
), ),
const SizedBox(height: 10), const SizedBox(height: 4),
locator<PatcherViewModel>().selectedApp == null locator<PatcherViewModel>().selectedApp == null
? I18nText('patchSelectorCard.widgetSubtitle') ? I18nText('patchSelectorCard.widgetSubtitle')
: locator<PatcherViewModel>().selectedPatches.isEmpty : locator<PatcherViewModel>().selectedPatches.isEmpty
@ -46,7 +46,7 @@ class PatchSelectorCard extends StatelessWidget {
String _getPatchesSelection() { String _getPatchesSelection() {
String text = ''; String text = '';
for (Patch p in locator<PatcherViewModel>().selectedPatches) { for (Patch p in locator<PatcherViewModel>().selectedPatches) {
text += '${p.getSimpleName()} (v${p.version})\n'; text += '\u2022 ${p.getSimpleName()} (v${p.version})\n';
} }
return text.substring(0, text.length - 1); return text.substring(0, text.length - 1);
} }

View File

@ -65,21 +65,14 @@ class _PatchItemState extends State<PatchItem> {
fontWeight: FontWeight.w600, fontWeight: FontWeight.w600,
), ),
), ),
const SizedBox(width: 4), const SizedBox(width: 6),
Container( Text(
padding: const EdgeInsets.symmetric( widget.version,
horizontal: 4, style: TextStyle(
vertical: 2, fontSize: 16,
color: Theme.of(context).colorScheme.secondary,
), ),
decoration: BoxDecoration( ),
color: Theme.of(context)
.colorScheme
.background
.withOpacity(0.5),
borderRadius: BorderRadius.circular(6),
),
child: Text(widget.version),
)
], ],
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
@ -88,7 +81,10 @@ class _PatchItemState extends State<PatchItem> {
softWrap: true, softWrap: true,
maxLines: 3, maxLines: 3,
overflow: TextOverflow.visible, overflow: TextOverflow.visible,
style: const TextStyle(fontSize: 14), style: TextStyle(
fontSize: 14,
color: Theme.of(context).colorScheme.onSecondaryContainer,
),
), ),
], ],
), ),
@ -119,12 +115,12 @@ class _PatchItemState extends State<PatchItem> {
padding: const EdgeInsets.only(top: 8), padding: const EdgeInsets.only(top: 8),
child: TextButton.icon( child: TextButton.icon(
label: I18nText('patchItem.unsupportedWarningButton'), label: I18nText('patchItem.unsupportedWarningButton'),
icon: const Icon(Icons.warning), icon: const Icon(Icons.warning, size: 20.0),
onPressed: () => _showUnsupportedWarningDialog(), onPressed: () => _showUnsupportedWarningDialog(),
style: ButtonStyle( style: ButtonStyle(
shape: MaterialStateProperty.all( shape: MaterialStateProperty.all(
RoundedRectangleBorder( RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(8),
side: BorderSide( side: BorderSide(
width: 1, width: 1,
color: color: