Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: sky/sdk/lib/widgets/tabs.dart

Issue 1241483002: Improve drawer menu items (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import 'dart:math' as math; 5 import 'dart:math' as math;
6 6
7 import 'package:sky/animation/scroll_behavior.dart'; 7 import 'package:sky/animation/scroll_behavior.dart';
8 import 'package:sky/painting/text_style.dart'; 8 import 'package:sky/painting/text_style.dart';
9 import 'package:sky/rendering/box.dart'; 9 import 'package:sky/rendering/box.dart';
10 import 'package:sky/rendering/object.dart'; 10 import 'package:sky/rendering/object.dart';
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 for (TabLabel label in labels) { 409 for (TabLabel label in labels) {
410 tabs.add(_toTab(label, tabIndex++)); 410 tabs.add(_toTab(label, tabIndex++));
411 if (label.text != null && label.icon != null) 411 if (label.text != null && label.icon != null)
412 textAndIcons = true; 412 textAndIcons = true;
413 } 413 }
414 414
415 ThemeData themeData = Theme.of(this); 415 ThemeData themeData = Theme.of(this);
416 Color backgroundColor = themeData.primaryColor; 416 Color backgroundColor = themeData.primaryColor;
417 Color indicatorColor = themeData.accentColor; 417 Color indicatorColor = themeData.accentColor;
418 if (indicatorColor == backgroundColor) { 418 if (indicatorColor == backgroundColor) {
419 indicatorColor = colors.White; 419 indicatorColor = colors.white;
420 } 420 }
421 421
422 TextStyle textStyle; 422 TextStyle textStyle;
423 IconThemeColor iconThemeColor; 423 IconThemeColor iconThemeColor;
424 switch (themeData.primaryColorBrightness) { 424 switch (themeData.primaryColorBrightness) {
425 case ThemeBrightness.light: 425 case ThemeBrightness.light:
426 textStyle = typography.black.body1; 426 textStyle = typography.black.body1;
427 iconThemeColor = IconThemeColor.black; 427 iconThemeColor = IconThemeColor.black;
428 break; 428 break;
429 case ThemeBrightness.dark: 429 case ThemeBrightness.dark:
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 selectedIndex: selectedIndex, 499 selectedIndex: selectedIndex,
500 scrollable: scrollable 500 scrollable: scrollable
501 ); 501 );
502 502
503 Widget content = views[selectedIndex].buildContent(); 503 Widget content = views[selectedIndex].buildContent();
504 return new Flex([tabBar, new Flexible(child: content)], 504 return new Flex([tabBar, new Flexible(child: content)],
505 direction: FlexDirection.vertical 505 direction: FlexDirection.vertical
506 ); 506 );
507 } 507 }
508 } 508 }
OLDNEW
« sky/sdk/lib/widgets/menu_item.dart ('K') | « sky/sdk/lib/widgets/menu_item.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698