refactor tabbar: Homepage adaptation

1. remove redundant MaterialApp in GetMaterialApp
2. unified background color

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages
2022-08-11 16:03:04 +08:00
parent 1440d26376
commit c799fb1857
13 changed files with 307 additions and 206 deletions

View File

@@ -263,7 +263,6 @@ class _RemotePageState extends State<RemotePage>
OverlayEntry(builder: (context) {
_ffi.chatModel.setOverlayState(Overlay.of(context));
return Container(
color: Colors.black,
child: getRawPointerAndKeyBody(getBodyForDesktop(keyboard)));
})
],
@@ -500,25 +499,20 @@ class _RemotePageState extends State<RemotePage>
Widget getBodyForDesktop(bool keyboard) {
var paints = <Widget>[
MouseRegion(
onEnter: (evt) {
bind.hostStopSystemKeyPropagate(stopped: false);
},
onExit: (evt) {
bind.hostStopSystemKeyPropagate(stopped: true);
},
child: Container(
color: MyTheme.canvasColor,
child: LayoutBuilder(builder: (context, constraints) {
Future.delayed(Duration.zero, () {
Provider.of<CanvasModel>(context, listen: false)
.updateViewStyle();
});
return ImagePaint(
id: widget.id,
);
}),
))
MouseRegion(onEnter: (evt) {
bind.hostStopSystemKeyPropagate(stopped: false);
}, onExit: (evt) {
bind.hostStopSystemKeyPropagate(stopped: true);
}, child: Container(
child: LayoutBuilder(builder: (context, constraints) {
Future.delayed(Duration.zero, () {
Provider.of<CanvasModel>(context, listen: false).updateViewStyle();
});
return ImagePaint(
id: widget.id,
);
}),
))
];
final cursor = bind.getSessionToggleOptionSync(
id: widget.id, arg: 'show-remote-cursor');