mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-05-11 10:26:19 +02:00
fix: web fullscreen (#9577)
Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
parent
560c1effe8
commit
83aba804d0
4 changed files with 80 additions and 18 deletions
|
@ -436,6 +436,7 @@ class _RemoteToolbarState extends State<RemoteToolbar> {
|
|||
shadowColor: MyTheme.color(context).shadow,
|
||||
borderRadius: borderRadius,
|
||||
child: _DraggableShowHide(
|
||||
id: widget.id,
|
||||
sessionId: widget.ffi.sessionId,
|
||||
dragging: _dragging,
|
||||
fractionX: _fractionX,
|
||||
|
@ -2218,6 +2219,7 @@ class RdoMenuButton<T> extends StatelessWidget {
|
|||
}
|
||||
|
||||
class _DraggableShowHide extends StatefulWidget {
|
||||
final String id;
|
||||
final SessionID sessionId;
|
||||
final RxDouble fractionX;
|
||||
final RxBool dragging;
|
||||
|
@ -2229,6 +2231,7 @@ class _DraggableShowHide extends StatefulWidget {
|
|||
|
||||
const _DraggableShowHide({
|
||||
Key? key,
|
||||
required this.id,
|
||||
required this.sessionId,
|
||||
required this.fractionX,
|
||||
required this.dragging,
|
||||
|
@ -2364,6 +2367,24 @@ class _DraggableShowHideState extends State<_DraggableShowHide> {
|
|||
),
|
||||
))),
|
||||
),
|
||||
if (isWebDesktop)
|
||||
Obx(() {
|
||||
if (show.isTrue) {
|
||||
return Offstage();
|
||||
} else {
|
||||
return TextButton(
|
||||
onPressed: () => closeConnection(id: widget.id),
|
||||
child: Tooltip(
|
||||
message: translate('Close'),
|
||||
child: Icon(
|
||||
Icons.close,
|
||||
size: iconSize,
|
||||
color: _ToolbarTheme.redColor,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
})
|
||||
],
|
||||
);
|
||||
return TextButtonTheme(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue