@@ -14,7 +14,7 @@ import 'package:bitsdojo_window/bitsdojo_window.dart';
14
14
15
15
void main () async {
16
16
runApp (const CoreCoderApp ());
17
- if (Platform .isWindows || Platform .isLinux || Platform .isMacOS ) {
17
+ if (CoreCoderApp .isDesktop ) {
18
18
doWhenWindowReady (() {
19
19
const initialSize = Size (800 , 600 );
20
20
appWindow.minSize = const Size (256 , 256 );
@@ -88,6 +88,7 @@ class CoreCoderAppState extends State<CoreCoderApp> {
88
88
child: Column (
89
89
children: [
90
90
// The title bar
91
+ if (CoreCoderApp .isDesktop)
91
92
WindowTitleBarBox (
92
93
child: Row (children: [
93
94
Expanded (
@@ -127,24 +128,25 @@ class CoreCoderAppState extends State<CoreCoderApp> {
127
128
}
128
129
}
129
130
130
- final buttonColors = WindowButtonColors (
131
- iconNormal: borderColor,
132
- mouseOver: Color (0xFFF6A00C ),
133
- mouseDown: Color (0xFF805306 ),
134
- iconMouseOver: Color (0xFF805306 ),
135
- iconMouseDown: Color (0xFFFFD500 ));
136
-
137
- final closeButtonColors = WindowButtonColors (
138
- mouseOver: const Color (0xFFD32F2F ),
139
- mouseDown: const Color (0xFFB71C1C ),
140
- iconNormal: borderColor,
141
- iconMouseOver: Colors .white);
142
-
143
131
class WindowButtons extends StatelessWidget {
144
132
const WindowButtons ({Key ? key}) : super (key: key);
145
133
146
134
@override
147
135
Widget build (BuildContext context) {
136
+ var theme = Theme .of (context);
137
+ var buttonColors = WindowButtonColors (
138
+ mouseOver: theme.canvasColor,
139
+ mouseDown: theme.backgroundColor,
140
+ iconNormal: theme.textTheme.bodyText1? .color,
141
+ iconMouseOver: theme.textTheme.bodyText1? .color,
142
+ iconMouseDown: theme.textTheme.bodyText1? .color);
143
+
144
+ var closeButtonColors = WindowButtonColors (
145
+ mouseOver: const Color (0xFFD32F2F ),
146
+ mouseDown: const Color (0xFFB71C1C ),
147
+ iconNormal: theme.textTheme.bodyText1? .color,
148
+ iconMouseOver: theme.textTheme.bodyText1? .color);
149
+
148
150
return Row (
149
151
children: [
150
152
MinimizeWindowButton (colors: buttonColors),
0 commit comments