various minor fixes

This commit is contained in:
Thibault Deckers 2020-11-30 14:14:39 +09:00
parent 3ef5cde4da
commit 93af6b0d1b
3 changed files with 35 additions and 21 deletions

View file

@ -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',

View file

@ -3,46 +3,55 @@ 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) {
final style = TextStyle(
shadows: [
Shadow(
color: Colors.black,
offset: Offset(1, 1),
blurRadius: 2,
)
],
fontSize: fontSize,
fontFamily: 'Concourse Caps',
);
return Align(
alignment: AlignmentDirectional.centerStart,
child: Container(
decoration: HighlightDecoration(
color: enabled ? color ?? stringToColor(name) : disabledColor,
color: enabled ? color ?? stringToColor(title) : disabledColor,
),
margin: EdgeInsets.symmetric(vertical: 4.0),
child: Text(
name,
style: TextStyle(
shadows: [
Shadow(
color: Colors.black,
offset: Offset(1, 1),
blurRadius: 2,
child: selectable
? SelectableText(
title,
style: style,
maxLines: 1,
)
],
fontSize: fontSize,
fontFamily: 'Concourse Caps',
),
softWrap: false,
overflow: TextOverflow.fade,
maxLines: 1,
),
: Text(
title,
style: style,
softWrap: false,
overflow: TextOverflow.fade,
maxLines: 1,
),
),
);
}

View file

@ -65,6 +65,7 @@ class XmpDirTile extends StatelessWidget {
child: HighlightTitle(
title,
color: BrandColors.get(title),
selectable: true,
),
),
InfoRowGroup(Map.fromEntries(entries), maxValueLength: Constants.infoGroupMaxValueLength),