Unverified Commit cfc5dc2a authored by Bruno Leroux's avatar Bruno Leroux Committed by GitHub

Increase Tooltip font size on Desktop (#103189)

parent e5718354
...@@ -406,7 +406,7 @@ class TooltipState extends State<Tooltip> with SingleTickerProviderStateMixin { ...@@ -406,7 +406,7 @@ class TooltipState extends State<Tooltip> with SingleTickerProviderStateMixin {
case TargetPlatform.macOS: case TargetPlatform.macOS:
case TargetPlatform.linux: case TargetPlatform.linux:
case TargetPlatform.windows: case TargetPlatform.windows:
return 10.0; return 12.0;
case TargetPlatform.android: case TargetPlatform.android:
case TargetPlatform.fuchsia: case TargetPlatform.fuchsia:
case TargetPlatform.iOS: case TargetPlatform.iOS:
......
...@@ -700,10 +700,7 @@ void main() { ...@@ -700,10 +700,7 @@ void main() {
return Tooltip( return Tooltip(
key: tooltipKey, key: tooltipKey,
message: tooltipText, message: tooltipText,
child: const SizedBox( child: const SizedBox.shrink(),
width: 0.0,
height: 0.0,
),
); );
}, },
), ),
...@@ -733,10 +730,7 @@ void main() { ...@@ -733,10 +730,7 @@ void main() {
home: Tooltip( home: Tooltip(
key: tooltipKey, key: tooltipKey,
message: tooltipText, message: tooltipText,
child: const SizedBox( child: const SizedBox.shrink(),
width: 0.0,
height: 0.0,
),
), ),
), ),
); );
...@@ -744,15 +738,14 @@ void main() { ...@@ -744,15 +738,14 @@ void main() {
await tester.pump(const Duration(seconds: 2)); // faded in, show timer started (and at 0.0) await tester.pump(const Duration(seconds: 2)); // faded in, show timer started (and at 0.0)
final RenderParagraph tooltipRenderParagraph = tester.renderObject<RenderParagraph>(find.text(tooltipText)); final RenderParagraph tooltipRenderParagraph = tester.renderObject<RenderParagraph>(find.text(tooltipText));
expect(tooltipRenderParagraph.textSize.height, equals(10.0)); expect(tooltipRenderParagraph.textSize.height, equals(12.0));
final RenderBox tip = tester.renderObject( final RenderBox tooltipContainer = tester.renderObject(
_findTooltipContainer(tooltipText), _findTooltipContainer(tooltipText),
); );
expect(tip.size.height, equals(24.0)); expect(tooltipContainer.size.height, equals(24.0));
expect(tip.size.width, equals(46.0)); expect(tooltipContainer, paints..rrect(
expect(tip, paints..rrect( rrect: RRect.fromRectAndRadius(tooltipContainer.paintBounds, const Radius.circular(4.0)),
rrect: RRect.fromRectAndRadius(tip.paintBounds, const Radius.circular(4.0)),
color: const Color(0xe6616161), color: const Color(0xe6616161),
)); ));
}, variant: const TargetPlatformVariant(<TargetPlatform>{TargetPlatform.macOS, TargetPlatform.linux, TargetPlatform.windows})); }, variant: const TargetPlatformVariant(<TargetPlatform>{TargetPlatform.macOS, TargetPlatform.linux, TargetPlatform.windows}));
......
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