mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-20 21:19:29 +02:00
Avoid overflow for long version strings on Apps page
This commit is contained in:
@@ -253,48 +253,49 @@ class AppsPageState extends State<AppsPage> {
|
|||||||
fontWeight: sortedApps[index].app.pinned
|
fontWeight: sortedApps[index].app.pinned
|
||||||
? FontWeight.bold
|
? FontWeight.bold
|
||||||
: FontWeight.normal)),
|
: FontWeight.normal)),
|
||||||
trailing: sortedApps[index].downloadProgress != null
|
trailing: SingleChildScrollView(
|
||||||
? Text(tr('percentProgress', args: [
|
reverse: true,
|
||||||
sortedApps[index]
|
child: sortedApps[index].downloadProgress != null
|
||||||
.downloadProgress
|
? Text(tr('percentProgress', args: [
|
||||||
?.toInt()
|
sortedApps[index]
|
||||||
.toString() ??
|
.downloadProgress
|
||||||
'100'
|
?.toInt()
|
||||||
]))
|
.toString() ??
|
||||||
: (Column(
|
'100'
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
]))
|
||||||
crossAxisAlignment: CrossAxisAlignment.end,
|
: (Column(
|
||||||
children: [
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
SingleChildScrollView(
|
crossAxisAlignment: CrossAxisAlignment.end,
|
||||||
child: SizedBox(
|
children: [
|
||||||
width: 80,
|
SizedBox(
|
||||||
|
width: 100,
|
||||||
child: Text(
|
child: Text(
|
||||||
'${sortedApps[index].app.installedVersion ?? tr('notInstalled')}${sortedApps[index].app.trackOnly == true ? ' ${tr('estimateInBrackets')}' : ''}',
|
'${sortedApps[index].app.installedVersion ?? tr('notInstalled')}${sortedApps[index].app.trackOnly == true ? ' ${tr('estimateInBrackets')}' : ''}',
|
||||||
overflow: TextOverflow.fade,
|
overflow: TextOverflow.fade,
|
||||||
textAlign: TextAlign.end,
|
textAlign: TextAlign.end,
|
||||||
))),
|
)),
|
||||||
sortedApps[index].app.installedVersion != null &&
|
sortedApps[index].app.installedVersion != null &&
|
||||||
sortedApps[index].app.installedVersion !=
|
sortedApps[index].app.installedVersion !=
|
||||||
sortedApps[index].app.latestVersion
|
sortedApps[index].app.latestVersion
|
||||||
? GestureDetector(
|
? GestureDetector(
|
||||||
onTap: changesUrl == null
|
onTap: changesUrl == null
|
||||||
? null
|
? null
|
||||||
: () {
|
: () {
|
||||||
launchUrlString(changesUrl,
|
launchUrlString(changesUrl,
|
||||||
mode: LaunchMode
|
mode: LaunchMode
|
||||||
.externalApplication);
|
.externalApplication);
|
||||||
},
|
},
|
||||||
child: Text(
|
child: Text(
|
||||||
'${tr('updateAvailable')}${sortedApps[index].app.trackOnly ? ' ${tr('estimateInBracketsShort')}' : ''}',
|
'${tr('updateAvailable')}${sortedApps[index].app.trackOnly ? ' ${tr('estimateInBracketsShort')}' : ''}',
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontStyle: FontStyle.italic,
|
fontStyle: FontStyle.italic,
|
||||||
decoration: changesUrl == null
|
decoration: changesUrl == null
|
||||||
? TextDecoration.none
|
? TextDecoration.none
|
||||||
: TextDecoration.underline),
|
: TextDecoration.underline),
|
||||||
))
|
))
|
||||||
: const SizedBox(),
|
: const SizedBox(),
|
||||||
],
|
],
|
||||||
)),
|
))),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
if (selectedApps.isNotEmpty) {
|
if (selectedApps.isNotEmpty) {
|
||||||
toggleAppSelected(sortedApps[index].app);
|
toggleAppSelected(sortedApps[index].app);
|
||||||
|
Reference in New Issue
Block a user