Skip to content

Commit fe50fc1

Browse files
authored
DevTools colors match IDE theme (#9144)
1 parent 1a81ec9 commit fe50fc1

10 files changed

Lines changed: 9 additions & 20 deletions

File tree

packages/devtools_app/lib/src/screens/debugger/program_explorer.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ class ProgramStructureIcon extends StatelessWidget {
255255
style: TextStyle(
256256
height: 1,
257257
fontFamily: theme.fixedFontStyle.fontFamily,
258-
color: theme.colorScheme.defaultBackgroundColor,
258+
color: theme.colorScheme.surface,
259259
fontSize: smallFontSize,
260260
),
261261
// Required to center the individual character within the

packages/devtools_app/lib/src/screens/memory/panes/chart/widgets/chart_pane.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import 'package:flutter/services.dart';
1010
import '../../../../../shared/charts/chart_controller.dart';
1111
import '../../../../../shared/globals.dart';
1212
import '../../../../../shared/primitives/utils.dart';
13-
import '../../../../../shared/ui/colors.dart';
1413
import '../../../../../shared/ui/common_widgets.dart';
1514
import '../../../../../shared/utils/utils.dart';
1615
import '../../../shared/primitives/painting.dart';
@@ -298,7 +297,7 @@ class _MemoryChartPaneState extends State<MemoryChartPane>
298297
child: Container(
299298
padding: const EdgeInsets.only(top: 5, bottom: 8),
300299
decoration: BoxDecoration(
301-
color: colorScheme.defaultBackgroundColor,
300+
color: colorScheme.surface,
302301
border: Border.all(
303302
color: focusColor,
304303
width: _hoverCardBorderWidth,

packages/devtools_app/lib/src/screens/memory/panes/chart/widgets/legend.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import 'package:devtools_app_shared/ui.dart';
66
import 'package:flutter/material.dart';
77

8-
import '../../../../../shared/ui/colors.dart';
98
import '../../../shared/primitives/painting.dart';
109
import '../controller/chart_pane_controller.dart';
1110
import '../controller/charts/android_chart_controller.dart';
@@ -85,7 +84,7 @@ class MemoryChartLegend extends StatelessWidget {
8584
height: isAndroidVisible ? _legendHeight2Charts : _legendHeight1Chart,
8685
padding: const EdgeInsets.only(top: densePadding, right: densePadding),
8786
decoration: BoxDecoration(
88-
color: colorScheme.defaultBackgroundColor,
87+
color: colorScheme.surface,
8988
border: Border.all(color: theme.focusColor),
9089
borderRadius: defaultBorderRadius,
9190
),

packages/devtools_app/lib/src/service/service_extension_widgets.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import '../shared/constants.dart';
2323
import '../shared/globals.dart';
2424
import '../shared/primitives/message_bus.dart';
2525
import '../shared/primitives/utils.dart';
26-
import '../shared/ui/colors.dart';
2726
import '../shared/ui/common_widgets.dart';
2827
import '../shared/ui/hover.dart';
2928
import 'service_extensions.dart';
@@ -891,7 +890,7 @@ class _ServiceExtensionCheckboxGroupOverlay extends StatelessWidget {
891890
width: width,
892891
padding: const EdgeInsets.all(defaultSpacing),
893892
decoration: BoxDecoration(
894-
color: theme.colorScheme.defaultBackgroundColor,
893+
color: theme.colorScheme.surface,
895894
border: Border.all(
896895
color: theme.focusColor,
897896
width: hoverCardBorderSize,

packages/devtools_app/lib/src/shared/charts/flame_chart.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1337,7 +1337,7 @@ class TimelineGridPainter extends FlameChartPainter {
13371337
constraints.maxWidth,
13381338
math.min(constraints.maxHeight, chartRowHeight),
13391339
),
1340-
Paint()..color = colorScheme.defaultBackgroundColor,
1340+
Paint()..color = colorScheme.surface,
13411341
);
13421342

13431343
// Paint the timeline grid lines and corresponding timestamps in the flame

packages/devtools_app/lib/src/shared/ui/colors.dart

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,12 @@ extension SyntaxHighlightingExtension on ColorScheme {
107107
isLight ? const Color(0xFF098658) : const Color(0xFFB5CEA8);
108108
}
109109

110-
// TODO(kenz): try to get rid of these colors and replace with something from
111-
// the light and dark DevTools color schemes.
112110
extension DevToolsColorExtension on ColorScheme {
113-
// TODO(jacobr): replace this with Theme.of(context).scaffoldBackgroundColor, but we use
114-
// this in places where we do not have access to the context.
115-
// remove.
116-
// TODO(kenz): get rid of this.
117-
Color get defaultBackgroundColor =>
118-
isLight ? Colors.grey[50]! : const Color(0xFF1B1B1F);
119-
120111
Color get grey => const Color.fromARGB(255, 128, 128, 128);
121112
Color get green =>
122113
isLight ? const Color(0xFF006B5F) : const Color(0xFF54DBC8);
123-
124114
Color get overlayShadowColor => const Color.fromRGBO(0, 0, 0, 0.5);
125-
Color get deeplinkTableHeaderColor => isLight ? Colors.white : Colors.black;
115+
// Deep link header is slightly darker than the default surface color. See
116+
// comment at: https://github.com/flutter/devtools/pull/7443/files#r1538361768
117+
Color get deeplinkTableHeaderColor => surface.darken();
126118
}

packages/devtools_app/lib/src/shared/ui/search.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ class AutoCompleteState extends State<AutoComplete> with AutoDisposeMixin {
405405
controller: controller,
406406
onTap: autoComplete.onTap,
407407
highlightColor: colorScheme.autoCompleteHighlightColor,
408-
defaultColor: colorScheme.defaultBackgroundColor,
408+
defaultColor: colorScheme.surface,
409409
),
410410
);
411411
}
-853 Bytes
Loading
3.07 KB
Loading
-100 Bytes
Loading

0 commit comments

Comments
 (0)