Skip to content

Commit 03d093b

Browse files
authored
Fixes for Material You (#269)
* Update main.dart * improve code * Fix getBottomSheetMenu in AMOLED theme * Fix getBottomSheetMenu on Material You * Fix showDialog in Material You theme * Increase grid view height for apps.dart * Update Hebrew * Fix
1 parent 2075606 commit 03d093b

4 files changed

Lines changed: 84 additions & 70 deletions

File tree

assets/translations/he.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,20 @@
8686
"filter": "סינון",
8787
"filterApps": "סינון יישומים",
8888
"appName": "שם היישום",
89-
"author": "מפתח/ת",
89+
"author": "מפתחים",
9090
"upToDateApps": "יישומים מעודכנים",
9191
"nonInstalledApps": "יישומים לא מותקנים",
9292
"importExport": "ייבוא/ייצוא",
9393
"settings": "הגדרות",
9494
"exportedTo": "בוצע ייצוא אל {}",
9595
"updatiumExport": "ייצוא מ־Updatium",
96-
"failedToExport": "Failed to export",
97-
"exportAlreadyInProgress": "Export already in progress",
98-
"failedToCreateExportFile": "Failed to create export file",
99-
"exportDirNotAccessible": "Export directory is not accessible",
96+
"failedToExport": "הייצוא נכשל",
97+
"exportAlreadyInProgress": "כבר מתבצע ייצוא",
98+
"failedToCreateExportFile": "נכשלה יצירת קובץ הייצוא",
99+
"exportDirNotAccessible": "התיקייה לייצוא אינה נגישה",
100100
"invalidInput": "קלט לא תקני",
101101
"importedX": "בוצא ייבוא של {}",
102-
"updatiumImport": "ייבוא ל־Updatium",
102+
"updatiumImport": "ייבוא אל Updatium",
103103
"importFromURLList": "ייבוא מרשימת כתובות",
104104
"searchQuery": "מילת חיפוש",
105105
"appURLList": "רשימת כתובות יישומים",
@@ -249,8 +249,8 @@
249249
"groupByCategory": "קיבוץ לפי קטגוריה",
250250
"listView": "תצוגת רשימה",
251251
"gridView": "תצוגת רשת",
252-
"autoApkFilterByArch": "Attempt to filter APKs by CPU architecture if possible",
253-
"autoLinkFilterByArch": "Attempt to filter links by CPU architecture if possible",
252+
"autoApkFilterByArch": "ביצוע ניסיון לסינון קובצי APK לפי ארכיטקטורת המעבד במידת האפשר",
253+
"autoLinkFilterByArch": "ביצוע לסינון קישורים לפי ארכיטקטורת המעבד במידת האפשר",
254254
"overrideSource": "דריסת המקור",
255255
"dontShowAgain": "לא להציג זאת שוב",
256256
"dontShowTrackOnlyWarnings": "לא להציג אזהרות מסוג ‚למעקב עדכונים בלבד’",
@@ -334,7 +334,7 @@
334334
"useVersionCodeAsOSVersion": "Use app versionCode as OS-detected version",
335335
"requestHeader": "כותרת בקשה",
336336
"useLatestAssetDateAsReleaseDate": "Use latest asset upload as release date",
337-
"defaultPseudoVersioningMethod": "Default pseudo-versioning method",
337+
"defaultPseudoVersioningMethod": "שיטת ברירת מחדל למספור מעֵין־גרסאות",
338338
"partialAPKHash": "גיבוב APK חלקי",
339339
"APKLinkHash": "גיבוב קישור APK",
340340
"directAPKLink": "קישור ישיר לקובץ APK",
@@ -450,8 +450,8 @@
450450
"other": "{} קובצי APK"
451451
},
452452
"certificateHash": {
453-
"one": "Certificate Hash",
454-
"other": "Certificate Hashes"
453+
"one": "גיבוב תעודה",
454+
"other": "גיבובי תעודה"
455455
},
456456
"securityDisclaimerTitle": "כתב ויתור בנוגע לאבטחה ונושאים משפטיים",
457457
"license": "רישיון",

lib/main.dart

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -904,8 +904,20 @@ class _UpdatiumState extends State<Updatium> {
904904
shape: RoundedRectangleBorder(
905905
borderRadius: BorderRadius.circular(28),
906906
),
907-
titleTextStyle: textTheme.headlineSmall,
908-
contentTextStyle: textTheme.bodyLarge,
907+
titleTextStyle: TextStyle(
908+
color: scheme.onSurface,
909+
fontSize: 24,
910+
fontWeight: FontWeight.w400,
911+
letterSpacing: 0,
912+
height: 1.33,
913+
),
914+
contentTextStyle: TextStyle(
915+
color: scheme.onSurface,
916+
fontSize: 16,
917+
fontWeight: FontWeight.w400,
918+
letterSpacing: 0.5,
919+
height: 1.5,
920+
),
909921
),
910922
);
911923
}

lib/pages/app.dart

Lines changed: 57 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ class _AppPageState extends State<AppPage> {
588588
);
589589

590590
getBottomSheetMenu() => Container(
591-
color: Theme.of(context).colorScheme.surface,
591+
color: Theme.of(context).colorScheme.surfaceContainerLow,
592592
child: Padding(
593593
padding: EdgeInsets.fromLTRB(
594594
16,
@@ -599,50 +599,27 @@ class _AppPageState extends State<AppPage> {
599599
child: Column(
600600
mainAxisSize: MainAxisSize.min,
601601
children: [
602-
Padding(
603-
padding: const EdgeInsets.fromLTRB(16, 8, 16, 0),
604-
child: Row(
605-
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
606-
children: [
607-
if (source != null &&
608-
source.combinedAppSpecificSettingFormItems.isNotEmpty)
609-
IconButton(
610-
onPressed: app?.downloadProgress != null || updating
611-
? null
612-
: () async {
613-
var values = await showAdditionalOptionsDialog();
614-
handleAdditionalOptionChanges(values);
615-
},
616-
tooltip: tr('additionalOptions'),
617-
icon: const Icon(Icons.edit),
618-
),
619-
if (app?.app.installedVersion != null &&
620-
app?.app.installedVersion != app?.app.latestVersion &&
621-
!isVersionDetectionStandard &&
622-
!trackOnly)
623-
IconButton(
624-
onPressed: app?.downloadProgress != null || updating
625-
? null
626-
: showMarkUpdatedDialog,
627-
tooltip: tr('markUpdated'),
628-
icon: const Icon(Icons.done),
629-
),
630-
if ((!isVersionDetectionStandard || trackOnly) &&
631-
app?.app.installedVersion != null &&
632-
app?.app.installedVersion == app?.app.latestVersion)
633-
IconButton(
634-
onPressed: app?.app == null || updating
635-
? null
636-
: () {
637-
app!.app.installedVersion = null;
638-
appsProvider.saveApps([app.app]);
639-
},
640-
icon: const Icon(Icons.restore_rounded),
641-
tooltip: tr('resetInstallStatus'),
642-
),
643-
const SizedBox(width: 16.0),
644-
Expanded(child: getInstallOrUpdateButton()),
645-
const SizedBox(width: 16.0),
602+
Padding(
603+
padding: const EdgeInsets.fromLTRB(16, 8, 16, 0),
604+
child: Row(
605+
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
606+
children: [
607+
if (source != null &&
608+
source.combinedAppSpecificSettingFormItems.isNotEmpty)
609+
IconButton(
610+
onPressed: app?.downloadProgress != null || updating
611+
? null
612+
: () async {
613+
var values = await showAdditionalOptionsDialog();
614+
handleAdditionalOptionChanges(values);
615+
},
616+
tooltip: tr('additionalOptions'),
617+
icon: const Icon(Icons.edit),
618+
),
619+
if (app?.app.installedVersion != null &&
620+
app?.app.installedVersion != app?.app.latestVersion &&
621+
!isVersionDetectionStandard &&
622+
!trackOnly)
646623
IconButton(
647624
onPressed: app?.downloadProgress != null || updating
648625
? null
@@ -661,19 +638,44 @@ class _AppPageState extends State<AppPage> {
661638
tooltip: tr('remove'),
662639
icon: const Icon(Icons.delete),
663640
),
664-
],
665-
),
641+
const SizedBox(width: 16.0),
642+
Expanded(child: getInstallOrUpdateButton()),
643+
const SizedBox(width: 16.0),
644+
IconButton(
645+
onPressed: app?.downloadProgress != null || updating
646+
? null
647+
: () {
648+
appsProvider
649+
.removeAppsWithModal(
650+
context,
651+
app != null ? [app.app] : [],
652+
)
653+
.then((value) {
654+
if (value == true) {
655+
Navigator.of(context).pop();
656+
}
657+
});
658+
},
659+
tooltip: tr('remove'),
660+
icon: const Icon(Icons.delete),
661+
),
662+
],
666663
),
667-
if (app?.downloadProgress != null)
668-
Padding(
669-
padding: const EdgeInsets.fromLTRB(0, 8, 0, 0),
670-
child: LinearProgressIndicator(
671-
value: app!.downloadProgress! >= 0
672-
? app.downloadProgress! / 100
673-
: null,
664+
),
665+
if (app?.downloadProgress != null)
666+
Padding(
667+
padding: const EdgeInsets.fromLTRB(0, 8, 0, 0),
668+
child: LinearProgressIndicator(
669+
value: app!.downloadProgress! >= 0
670+
? app.downloadProgress! / 100
671+
: null,
672+
backgroundColor: Theme.of(context).colorScheme.surfaceContainerHighest,
673+
valueColor: AlwaysStoppedAnimation<Color>(
674+
Theme.of(context).colorScheme.primary,
674675
),
675676
),
676-
],
677+
),
678+
],
677679
),
678680
),
679681
);

lib/pages/apps.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,6 @@ class AppsPageState extends State<AppsPage> {
640640

641641
return SizedBox(
642642
width: 120,
643-
height: double.infinity,
644643
child: Center(child: action),
645644
);
646645
},
@@ -704,8 +703,9 @@ class AppsPageState extends State<AppsPage> {
704703
child: ListTile(
705704
contentPadding: const EdgeInsets.symmetric(
706705
horizontal: 24,
707-
vertical: 12,
706+
vertical: 16,
708707
),
708+
minVerticalPadding: 8,
709709
shape: RoundedRectangleBorder(
710710
borderRadius: BorderRadius.circular(16),
711711
side: selectedAppIds.contains(listedApps[index].app.id)

0 commit comments

Comments
 (0)