various minor fixes
This commit is contained in:
parent
3ef5cde4da
commit
93af6b0d1b
3 changed files with 35 additions and 21 deletions
|
@ -4,14 +4,17 @@ class XMP {
|
|||
|
||||
// cf https://exiftool.org/TagNames/XMP.html
|
||||
static const Map<String, String> namespaces = {
|
||||
'adsml-at': 'AdsML',
|
||||
'aux': 'Exif Aux',
|
||||
'Camera': 'Camera',
|
||||
'crs': 'Camera Raw Settings',
|
||||
'dc': 'Dublin Core',
|
||||
'drone-dji': 'DJI Drone',
|
||||
'exif': 'Exif',
|
||||
'exifEX': 'Exif Ex',
|
||||
'GettyImagesGIFT': 'Getty Images',
|
||||
'GIMP': 'GIMP',
|
||||
'GPano': 'Google Photo Sphere',
|
||||
'illustrator': 'Illustrator',
|
||||
'Iptc4xmpCore': 'IPTC Core',
|
||||
'lr': 'Lightroom',
|
||||
|
@ -19,6 +22,7 @@ class XMP {
|
|||
'panorama': 'Panorama',
|
||||
'pdf': 'PDF',
|
||||
'pdfx': 'PDF/X',
|
||||
'PanoStudioXMP': 'PanoramaStudio',
|
||||
'photomechanic': 'Photo Mechanic',
|
||||
'photoshop': 'Photoshop',
|
||||
'plus': 'PLUS',
|
||||
|
|
|
@ -3,32 +3,24 @@ import 'package:aves/widgets/common/fx/highlight_decoration.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
class HighlightTitle extends StatelessWidget {
|
||||
final String name;
|
||||
final String title;
|
||||
final Color color;
|
||||
final double fontSize;
|
||||
final bool enabled;
|
||||
final bool enabled, selectable;
|
||||
|
||||
const HighlightTitle(
|
||||
this.name, {
|
||||
this.title, {
|
||||
this.color,
|
||||
this.fontSize = 20,
|
||||
this.enabled = true,
|
||||
}) : assert(name != null);
|
||||
this.selectable = false,
|
||||
}) : assert(title != null);
|
||||
|
||||
static const disabledColor = Colors.grey;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Align(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
child: Container(
|
||||
decoration: HighlightDecoration(
|
||||
color: enabled ? color ?? stringToColor(name) : disabledColor,
|
||||
),
|
||||
margin: EdgeInsets.symmetric(vertical: 4.0),
|
||||
child: Text(
|
||||
name,
|
||||
style: TextStyle(
|
||||
final style = TextStyle(
|
||||
shadows: [
|
||||
Shadow(
|
||||
color: Colors.black,
|
||||
|
@ -38,7 +30,24 @@ class HighlightTitle extends StatelessWidget {
|
|||
],
|
||||
fontSize: fontSize,
|
||||
fontFamily: 'Concourse Caps',
|
||||
);
|
||||
|
||||
return Align(
|
||||
alignment: AlignmentDirectional.centerStart,
|
||||
child: Container(
|
||||
decoration: HighlightDecoration(
|
||||
color: enabled ? color ?? stringToColor(title) : disabledColor,
|
||||
),
|
||||
margin: EdgeInsets.symmetric(vertical: 4.0),
|
||||
child: selectable
|
||||
? SelectableText(
|
||||
title,
|
||||
style: style,
|
||||
maxLines: 1,
|
||||
)
|
||||
: Text(
|
||||
title,
|
||||
style: style,
|
||||
softWrap: false,
|
||||
overflow: TextOverflow.fade,
|
||||
maxLines: 1,
|
||||
|
|
|
@ -65,6 +65,7 @@ class XmpDirTile extends StatelessWidget {
|
|||
child: HighlightTitle(
|
||||
title,
|
||||
color: BrandColors.get(title),
|
||||
selectable: true,
|
||||
),
|
||||
),
|
||||
InfoRowGroup(Map.fromEntries(entries), maxValueLength: Constants.infoGroupMaxValueLength),
|
||||
|
|
Loading…
Reference in a new issue