diff --git a/flutter/lib/common.dart b/flutter/lib/common.dart index 8b0cb710c..21dc427cc 100644 --- a/flutter/lib/common.dart +++ b/flutter/lib/common.dart @@ -111,32 +111,39 @@ class ColorThemeExtension extends ThemeExtension { required this.border, required this.border2, required this.highlight, + required this.drag_indicator, }); final Color? border; final Color? border2; final Color? highlight; + final Color? drag_indicator; - static const light = ColorThemeExtension( + static final light = ColorThemeExtension( border: Color(0xFFCCCCCC), border2: Color(0xFFBBBBBB), highlight: Color(0xFFE5E5E5), + drag_indicator: Colors.grey[800], ); - static const dark = ColorThemeExtension( + static final dark = ColorThemeExtension( border: Color(0xFF555555), border2: Color(0xFFE5E5E5), highlight: Color(0xFF3F3F3F), + drag_indicator: Colors.grey, ); @override ThemeExtension copyWith( - {Color? border, Color? border2, Color? highlight}) { + {Color? border, + Color? border2, + Color? highlight, + Color? drag_indicator}) { return ColorThemeExtension( - border: border ?? this.border, - border2: border2 ?? this.border2, - highlight: highlight ?? this.highlight, - ); + border: border ?? this.border, + border2: border2 ?? this.border2, + highlight: highlight ?? this.highlight, + drag_indicator: drag_indicator ?? this.drag_indicator); } @override @@ -149,6 +156,7 @@ class ColorThemeExtension extends ThemeExtension { border: Color.lerp(border, other.border, t), border2: Color.lerp(border2, other.border2, t), highlight: Color.lerp(highlight, other.highlight, t), + drag_indicator: Color.lerp(drag_indicator, other.drag_indicator, t), ); } } diff --git a/flutter/lib/desktop/widgets/remote_menubar.dart b/flutter/lib/desktop/widgets/remote_menubar.dart index 0f63a2814..c444214c6 100644 --- a/flutter/lib/desktop/widgets/remote_menubar.dart +++ b/flutter/lib/desktop/widgets/remote_menubar.dart @@ -2107,7 +2107,7 @@ class _DraggableShowHideState extends State<_DraggableShowHide> { child: Icon( Icons.drag_indicator, size: 20, - color: Colors.grey[800], + color: MyTheme.color(context).drag_indicator, ), feedback: widget, onDragStarted: (() { @@ -2159,7 +2159,11 @@ class _DraggableShowHideState extends State<_DraggableShowHide> { data: TextButtonThemeData(style: buttonStyle), child: Container( decoration: BoxDecoration( - color: Colors.white, + color: Theme.of(context) + .menuBarTheme + .style + ?.backgroundColor + ?.resolve(MaterialState.values.toSet()), borderRadius: BorderRadius.vertical( bottom: Radius.circular(5), ),