Skip to content

Commit

Permalink
fix: tweak card appearances (#296)
Browse files Browse the repository at this point in the history
* fix: tweak card appearances

* Update patch_selector_card.dart
  • Loading branch information
xafn authored Sep 25, 2022
1 parent db18874 commit 7ecf951
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 31 deletions.
2 changes: 1 addition & 1 deletion lib/ui/widgets/contributorsView/contributors_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class _ContributorsCardState extends State<ContributorsCard> {
'',
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
fontWeight: FontWeight.w500,
),
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/widgets/homeView/latest_commit_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class _LatestCommitCardState extends State<LatestCommitCard> {
),
],
),
const SizedBox(height: 8),
const SizedBox(height: 4),
Row(
children: <Widget>[
I18nText('latestCommitCard.managerLabel'),
Expand Down
20 changes: 10 additions & 10 deletions lib/ui/widgets/patcherView/app_selector_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class AppSelectorCard extends StatelessWidget {
),
),
),
const SizedBox(height: 10),
const SizedBox(height: 8),
locator<PatcherViewModel>().selectedApp == null
? I18nText('appSelectorCard.widgetSubtitle')
: Row(
Expand All @@ -49,21 +49,21 @@ class AppSelectorCard extends StatelessWidget {
),
),
const SizedBox(width: 6),
Text(locator<PatcherViewModel>().getAppSelectionString()),
Text(
locator<PatcherViewModel>()
.getAppSelectionString(),
style: const TextStyle(fontWeight: FontWeight.w600),
),
],
),
locator<PatcherViewModel>().selectedApp == null
? Container()
: Column(
children: [
const SizedBox(height: 10),
Padding(
padding: const EdgeInsets.only(left: 20),
child: Text(
locator<PatcherViewModel>()
.getRecommendedVersionString(context),
style: const TextStyle(fontStyle: FontStyle.italic),
),
const SizedBox(height: 4),
Text(
locator<PatcherViewModel>()
.getRecommendedVersionString(context),
),
],
),
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/patcherView/patch_selector_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class PatchSelectorCard extends StatelessWidget {
),
),
),
const SizedBox(height: 10),
const SizedBox(height: 4),
locator<PatcherViewModel>().selectedApp == null
? I18nText('patchSelectorCard.widgetSubtitle')
: locator<PatcherViewModel>().selectedPatches.isEmpty
Expand All @@ -46,7 +46,7 @@ class PatchSelectorCard extends StatelessWidget {
String _getPatchesSelection() {
String text = '';
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);
}
Expand Down
30 changes: 13 additions & 17 deletions lib/ui/widgets/patchesSelectorView/patch_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,14 @@ class _PatchItemState extends State<PatchItem> {
fontWeight: FontWeight.w600,
),
),
const SizedBox(width: 4),
Container(
padding: const EdgeInsets.symmetric(
horizontal: 4,
vertical: 2,
),
decoration: BoxDecoration(
color: Theme.of(context)
.colorScheme
.background
.withOpacity(0.5),
borderRadius: BorderRadius.circular(6),
const SizedBox(width: 6),
Text(
widget.version,
style: TextStyle(
fontSize: 16,
color: Theme.of(context).colorScheme.secondary,
),
child: Text(widget.version),
)
),
],
),
const SizedBox(height: 4),
Expand All @@ -88,7 +81,10 @@ class _PatchItemState extends State<PatchItem> {
softWrap: true,
maxLines: 3,
overflow: TextOverflow.visible,
style: const TextStyle(fontSize: 14),
style: TextStyle(
fontSize: 14,
color: Theme.of(context).colorScheme.onSecondaryContainer,
),
),
],
),
Expand Down Expand Up @@ -119,12 +115,12 @@ class _PatchItemState extends State<PatchItem> {
padding: const EdgeInsets.only(top: 8),
child: TextButton.icon(
label: I18nText('patchItem.unsupportedWarningButton'),
icon: const Icon(Icons.warning),
icon: const Icon(Icons.warning, size: 20.0),
onPressed: () => _showUnsupportedWarningDialog(),
style: ButtonStyle(
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
borderRadius: BorderRadius.circular(8),
side: BorderSide(
width: 1,
color:
Expand Down

0 comments on commit 7ecf951

Please sign in to comment.