Commit ea21d0c5 authored by Ian Hickson's avatar Ian Hickson Committed by Chris Bracken

Make the text shorter so that it doesn't overflow (#7970)

The Ahem font has a much wider average text width than most fonts.
parent 2116f00b
...@@ -20,11 +20,11 @@ void main() { ...@@ -20,11 +20,11 @@ void main() {
}, },
columns: <DataColumn>[ columns: <DataColumn>[
new DataColumn( new DataColumn(
label: new Text('Name'), label: new Text('N'),
tooltip: 'Name', tooltip: 'Name',
), ),
new DataColumn( new DataColumn(
label: new Text('Calories'), label: new Text('Cc'),
tooltip: 'Calories', tooltip: 'Calories',
numeric: true, numeric: true,
onSort: (int columnIndex, bool ascending) { onSort: (int columnIndex, bool ascending) {
...@@ -64,12 +64,12 @@ void main() { ...@@ -64,12 +64,12 @@ void main() {
expect(log, <String>['select-all: true']); expect(log, <String>['select-all: true']);
log.clear(); log.clear();
await tester.tap(find.text('Cupcake')); await tester.tap(find.text('C'));
expect(log, <String>['row-selected: Cupcake']); expect(log, <String>['row-selected: C']);
log.clear(); log.clear();
await tester.tap(find.text('Calories')); await tester.tap(find.text('Cc'));
expect(log, <String>['column-sort: 1 true']); expect(log, <String>['column-sort: 1 true']);
log.clear(); log.clear();
...@@ -78,7 +78,7 @@ void main() { ...@@ -78,7 +78,7 @@ void main() {
home: new Material(child: buildTable(sortColumnIndex: 1)) home: new Material(child: buildTable(sortColumnIndex: 1))
)); ));
await tester.pumpUntilNoTransientCallbacks(const Duration(milliseconds: 200)); await tester.pumpUntilNoTransientCallbacks(const Duration(milliseconds: 200));
await tester.tap(find.text('Calories')); await tester.tap(find.text('Cc'));
expect(log, <String>['column-sort: 1 false']); expect(log, <String>['column-sort: 1 false']);
log.clear(); log.clear();
...@@ -95,7 +95,7 @@ void main() { ...@@ -95,7 +95,7 @@ void main() {
await tester.tap(find.byType(Checkbox).last); await tester.tap(find.byType(Checkbox).last);
expect(log, <String>['row-selected: KitKat']); expect(log, <String>['row-selected: KK']);
log.clear(); log.clear();
}); });
} }
...@@ -16,14 +16,14 @@ class Dessert { ...@@ -16,14 +16,14 @@ class Dessert {
} }
final List<Dessert> kDesserts = <Dessert>[ final List<Dessert> kDesserts = <Dessert>[
new Dessert('Frozen yogurt', 159, 6.0, 24, 4.0, 87, 14, 1), new Dessert('FY', 159, 6.0, 24, 4.0, 87, 14, 1),
new Dessert('Ice cream sandwich', 237, 9.0, 37, 4.3, 129, 8, 1), new Dessert('ICS', 237, 9.0, 37, 4.3, 129, 8, 1),
new Dessert('Eclair', 262, 16.0, 24, 6.0, 337, 6, 7), new Dessert('E', 262, 16.0, 24, 6.0, 337, 6, 7),
new Dessert('Cupcake', 305, 3.7, 67, 4.3, 413, 3, 8), new Dessert('C', 305, 3.7, 67, 4.3, 413, 3, 8),
new Dessert('Gingerbread', 356, 16.0, 49, 3.9, 327, 7, 16), new Dessert('G', 356, 16.0, 49, 3.9, 327, 7, 16),
new Dessert('Jelly bean', 375, 0.0, 94, 0.0, 50, 0, 0), new Dessert('JB', 375, 0.0, 94, 0.0, 50, 0, 0),
new Dessert('Lollipop', 392, 0.2, 98, 0.0, 38, 0, 2), new Dessert('L', 392, 0.2, 98, 0.0, 38, 0, 2),
new Dessert('Honeycomb', 408, 3.2, 87, 6.5, 562, 0, 45), new Dessert('H', 408, 3.2, 87, 6.5, 562, 0, 45),
new Dessert('Donut', 452, 25.0, 51, 4.9, 326, 2, 22), new Dessert('D', 452, 25.0, 51, 4.9, 326, 2, 22),
new Dessert('KitKat', 518, 26.0, 65, 7.0, 54, 12, 6), new Dessert('KK', 518, 26.0, 65, 7.0, 54, 12, 6),
]; ];
...@@ -88,8 +88,8 @@ void main() { ...@@ -88,8 +88,8 @@ void main() {
home: buildTable(source), home: buildTable(source),
)); ));
expect(find.text('Gingerbread (0)'), findsOneWidget); expect(find.text('G (0)'), findsOneWidget);
expect(find.text('Gingerbread (1)'), findsNothing); expect(find.text('G (1)'), findsNothing);
expect(find.text('42'), findsNWidgets(10)); expect(find.text('42'), findsNWidgets(10));
source.generation = 43; source.generation = 43;
...@@ -118,9 +118,9 @@ void main() { ...@@ -118,9 +118,9 @@ void main() {
await tester.pump(); await tester.pump();
expect(find.text('Gingerbread (0)'), findsNothing); expect(find.text('G (0)'), findsNothing);
expect(find.text('Gingerbread (1)'), findsNothing); expect(find.text('G (1)'), findsNothing);
expect(find.text('Gingerbread (2)'), findsOneWidget); expect(find.text('G (2)'), findsOneWidget);
await tester.tap(find.icon(Icons.adjust)); await tester.tap(find.icon(Icons.adjust));
expect(log, <String>['action: adjust']); expect(log, <String>['action: adjust']);
...@@ -147,9 +147,9 @@ void main() { ...@@ -147,9 +147,9 @@ void main() {
log.add('page-changed: $rowIndex'); log.add('page-changed: $rowIndex');
}, },
columns: <DataColumn>[ columns: <DataColumn>[
new DataColumn(label: new Text('Name')), new DataColumn(label: new Text('N')),
new DataColumn(label: new Text('Calories'), numeric: true), new DataColumn(label: new Text('Cc'), numeric: true),
new DataColumn(label: new Text('Generation')), new DataColumn(label: new Text('Ggg')),
], ],
) )
)); ));
...@@ -161,9 +161,9 @@ void main() { ...@@ -161,9 +161,9 @@ void main() {
await tester.pump(); await tester.pump();
expect(find.text('Frozen yogurt (0)'), findsNothing); expect(find.text('FY (0)'), findsNothing);
expect(find.text('Eclair (0)'), findsOneWidget); expect(find.text('E (0)'), findsOneWidget);
expect(find.text('Gingerbread (0)'), findsNothing); expect(find.text('G (0)'), findsNothing);
await tester.tap(find.icon(Icons.chevron_left)); await tester.tap(find.icon(Icons.chevron_left));
...@@ -172,9 +172,9 @@ void main() { ...@@ -172,9 +172,9 @@ void main() {
await tester.pump(); await tester.pump();
expect(find.text('Frozen yogurt (0)'), findsOneWidget); expect(find.text('FY (0)'), findsOneWidget);
expect(find.text('Eclair (0)'), findsNothing); expect(find.text('E (0)'), findsNothing);
expect(find.text('Gingerbread (0)'), findsNothing); expect(find.text('G (0)'), findsNothing);
await tester.tap(find.icon(Icons.chevron_left)); await tester.tap(find.icon(Icons.chevron_left));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment