Add a less obvious touch target to highlights (#1694)

This commit is contained in:
Imran Remtulla
2024-06-28 22:29:34 -04:00
parent c90a571f89
commit bb45a157b3

View File

@@ -161,25 +161,46 @@ class _AppPageState extends State<AppPage> {
if (app?.app.apkUrls.isNotEmpty == true || if (app?.app.apkUrls.isNotEmpty == true ||
app?.app.otherAssetUrls.isNotEmpty == true) app?.app.otherAssetUrls.isNotEmpty == true)
GestureDetector( GestureDetector(
onTap: app?.app == null || updating onTap: app?.app == null || updating
? null ? null
: () async { : () async {
try { try {
await appsProvider await appsProvider
.downloadAppAssets([app!.app.id], context); .downloadAppAssets([app!.app.id], context);
} catch (e) { } catch (e) {
showError(e, context); showError(e, context);
} }
}, },
child: Text( child: Row(
tr('downloadX', args: [tr('releaseAsset').toLowerCase()]), mainAxisAlignment: MainAxisAlignment.center,
textAlign: TextAlign.center, children: [
style: Theme.of(context).textTheme.labelSmall!.copyWith( Container(
decoration: TextDecoration.underline, decoration: BoxDecoration(
fontStyle: FontStyle.italic, borderRadius: BorderRadius.circular(12),
), color: settingsProvider.highlightTouchTargets
), ? (Theme.of(context).brightness ==
), Brightness.light
? Theme.of(context).primaryColor
: Theme.of(context).primaryColorLight)
.withAlpha(20)
: null),
padding: settingsProvider.highlightTouchTargets
? const EdgeInsetsDirectional.fromSTEB(12, 6, 12, 6)
: const EdgeInsetsDirectional.fromSTEB(0, 6, 0, 6),
margin:
const EdgeInsetsDirectional.fromSTEB(0, 6, 0, 0),
child: Text(
tr('downloadX',
args: [tr('releaseAsset').toLowerCase()]),
textAlign: TextAlign.center,
style:
Theme.of(context).textTheme.labelSmall!.copyWith(
decoration: TextDecoration.underline,
fontStyle: FontStyle.italic,
),
))
],
)),
const SizedBox( const SizedBox(
height: 48, height: 48,
), ),