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.
This commit is contained in:
Hans Muller 2015-06-26 16:16:00 -07:00
parent 952dbc73e4
commit 06cc009b34

View File

@ -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)