From 06cc009b342b66ecb0967bab8582f7a711476e52 Mon Sep 17 00:00:00 2001 From: Hans Muller Date: Fri, 26 Jun 2015 16:16:00 -0700 Subject: [PATCH] Make TabBar conform to the Material spec for icon/text tabs When both icons and text are specified, the icon goes on top, 10 pixels of margin goes in between, and the TabBar's height grows to 72. R=ianh@google.com Review URL: https://codereview.chromium.org/1213043002. --- .../flutter/tests/examples/tabs-expected.txt | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/engine/src/flutter/tests/examples/tabs-expected.txt b/engine/src/flutter/tests/examples/tabs-expected.txt index 65750740f7..a6797f7d6e 100644 --- a/engine/src/flutter/tests/examples/tabs-expected.txt +++ b/engine/src/flutter/tests/examples/tabs-expected.txt @@ -11,7 +11,7 @@ PAINT FOR FRAME #2 ---------------------------------------------- 2 | | paintChild RenderDecoratedBox at Point(0.0, 81.0) 2 | | | TestRenderCanvas() constructor: 800.0 x 600.0 2 | | | drawRRect(Instance of 'RRect', Paint(color:Color(0xff9e9e9e))) -2 | | | paintChild RenderBlock at Point(0.0, 163.5) +2 | | | paintChild RenderBlock at Point(0.0, 150.5) 2 | | | | TestRenderCanvas() constructor: 800.0 x 600.0 2 | | | | paintChild RenderPadding at Point(0.0, 0.0) 2 | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 @@ -73,24 +73,28 @@ PAINT FOR FRAME #2 ---------------------------------------------- 2 | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 2 | | | | | paintChild RenderTabBar at Point(0.0, 0.0) 2 | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 -2 | | | | | | drawRect(Rect.fromLTRB(0.0, 0.0, 800.0, 48.0), Paint(color:Color(0xff3f51b5))) +2 | | | | | | drawRect(Rect.fromLTRB(0.0, 0.0, 800.0, 74.0), Paint(color:Color(0xff3f51b5))) 2 | | | | | | paintChild RenderInkWell at Point(0.0, 0.0) 2 | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 2 | | | | | | | paintChild RenderOpacity at Point(65.5, 0.0) 2 | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 -2 | | | | | | | | paintChild RenderParagraph at Point(0.0, 4.0) +2 | | | | | | | | paintChild RenderPadding at Point(22.5, 12.0) 2 | | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 -2 | | | | | | | | paintChild RenderImage at Point(22.5, 20.0) +2 | | | | | | | | | paintChild RenderImage at Point(0.0, 0.0) +2 | | | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 +2 | | | | | | | | paintChild RenderParagraph at Point(0.0, 46.0) 2 | | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 -2 | | | | | | drawRect(Rect.fromLTRB(0.0, 46.0, 200.0, 48.0), Paint(color:Color(0xffff4081))) +2 | | | | | | drawRect(Rect.fromLTRB(0.0, 72.0, 200.0, 74.0), Paint(color:Color(0xffff4081))) 2 | | | | | | paintChild RenderInkWell at Point(200.0, 0.0) 2 | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 2 | | | | | | | paintChild RenderOpacity at Point(64.0, 0.0) 2 | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 2 | | | | | | | | saveLayer(null, Paint(color:Color(0xb3000000))) -2 | | | | | | | | paintChild RenderParagraph at Point(0.0, 4.0) +2 | | | | | | | | paintChild RenderPadding at Point(24.0, 12.0) 2 | | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 -2 | | | | | | | | paintChild RenderImage at Point(24.0, 20.0) +2 | | | | | | | | | paintChild RenderImage at Point(0.0, 0.0) +2 | | | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 +2 | | | | | | | | paintChild RenderParagraph at Point(0.0, 46.0) 2 | | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 2 | | | | | | | | restore 2 | | | | | | paintChild RenderInkWell at Point(400.0, 0.0) @@ -98,9 +102,11 @@ PAINT FOR FRAME #2 ---------------------------------------------- 2 | | | | | | | paintChild RenderOpacity at Point(63.0, 0.0) 2 | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 2 | | | | | | | | saveLayer(null, Paint(color:Color(0xb3000000))) -2 | | | | | | | | paintChild RenderParagraph at Point(0.0, 4.0) +2 | | | | | | | | paintChild RenderPadding at Point(25.0, 12.0) 2 | | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 -2 | | | | | | | | paintChild RenderImage at Point(25.0, 20.0) +2 | | | | | | | | | paintChild RenderImage at Point(0.0, 0.0) +2 | | | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 +2 | | | | | | | | paintChild RenderParagraph at Point(0.0, 46.0) 2 | | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 2 | | | | | | | | restore 2 | | | | | | paintChild RenderInkWell at Point(600.0, 0.0) @@ -108,9 +114,11 @@ PAINT FOR FRAME #2 ---------------------------------------------- 2 | | | | | | | paintChild RenderOpacity at Point(61.0, 0.0) 2 | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 2 | | | | | | | | saveLayer(null, Paint(color:Color(0xb3000000))) -2 | | | | | | | | paintChild RenderParagraph at Point(0.0, 4.0) +2 | | | | | | | | paintChild RenderPadding at Point(27.0, 12.0) 2 | | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 -2 | | | | | | | | paintChild RenderImage at Point(27.0, 20.0) +2 | | | | | | | | | paintChild RenderImage at Point(0.0, 0.0) +2 | | | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 +2 | | | | | | | | paintChild RenderParagraph at Point(0.0, 46.0) 2 | | | | | | | | | TestRenderCanvas() constructor: 800.0 x 600.0 2 | | | | | | | | restore 2 | | paintChild RenderDecoratedBox at Point(0.0, 0.0)