mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +00:00
Fix. Custom client, maxmize of incoming only (#7406)
* Fix. Custom client, maxmize of incoming only Signed-off-by: fufesou <shuanglongchen@yeah.net> * format Signed-off-by: fufesou <shuanglongchen@yeah.net> --------- Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -375,7 +375,8 @@ class DesktopTab extends StatelessWidget {
|
||||
Expanded(
|
||||
child: GestureDetector(
|
||||
// custom double tap handler
|
||||
onTap: !bind.isIncomingOnly() && showMaximize
|
||||
onTap: !(bind.isIncomingOnly() && isInHomePage()) &&
|
||||
showMaximize
|
||||
? () {
|
||||
final current = DateTime.now().millisecondsSinceEpoch;
|
||||
final elapsed = current - _lastClickTime;
|
||||
@@ -691,7 +692,9 @@ class WindowActionPanelState extends State<WindowActionPanel>
|
||||
icon: stateGlobal.isMaximized.isTrue
|
||||
? IconFont.restore
|
||||
: IconFont.max,
|
||||
onTap: _toggleMaximize,
|
||||
onTap: bind.isIncomingOnly() && isInHomePage()
|
||||
? null
|
||||
: _toggleMaximize,
|
||||
isClose: false,
|
||||
))),
|
||||
Offstage(
|
||||
@@ -1107,7 +1110,7 @@ class _CloseButton extends StatelessWidget {
|
||||
class ActionIcon extends StatefulWidget {
|
||||
final String? message;
|
||||
final IconData icon;
|
||||
final Function() onTap;
|
||||
final GestureTapCallback? onTap;
|
||||
final bool isClose;
|
||||
final double iconSize;
|
||||
final double boxSize;
|
||||
@@ -1116,7 +1119,7 @@ class ActionIcon extends StatefulWidget {
|
||||
{Key? key,
|
||||
this.message,
|
||||
required this.icon,
|
||||
required this.onTap,
|
||||
this.onTap,
|
||||
this.isClose = false,
|
||||
this.iconSize = _kActionIconSize,
|
||||
this.boxSize = _kTabBarHeight - 1})
|
||||
@@ -1140,24 +1143,30 @@ class _ActionIconState extends State<ActionIcon> {
|
||||
return Tooltip(
|
||||
message: widget.message != null ? translate(widget.message!) : "",
|
||||
waitDuration: const Duration(seconds: 1),
|
||||
child: Obx(
|
||||
() => InkWell(
|
||||
hoverColor: widget.isClose
|
||||
? const Color.fromARGB(255, 196, 43, 28)
|
||||
: MyTheme.tabbar(context).hoverColor,
|
||||
onHover: (value) => hover.value = value,
|
||||
onTap: widget.onTap,
|
||||
child: SizedBox(
|
||||
height: widget.boxSize,
|
||||
width: widget.boxSize,
|
||||
child: Icon(
|
||||
widget.icon,
|
||||
color: hover.value && widget.isClose
|
||||
? Colors.white
|
||||
: MyTheme.tabbar(context).unSelectedIconColor,
|
||||
size: widget.iconSize,
|
||||
),
|
||||
),
|
||||
child: InkWell(
|
||||
hoverColor: widget.isClose
|
||||
? const Color.fromARGB(255, 196, 43, 28)
|
||||
: MyTheme.tabbar(context).hoverColor,
|
||||
onHover: (value) => hover.value = value,
|
||||
onTap: widget.onTap,
|
||||
child: SizedBox(
|
||||
height: widget.boxSize,
|
||||
width: widget.boxSize,
|
||||
child: widget.onTap == null
|
||||
? Icon(
|
||||
widget.icon,
|
||||
color: Colors.grey,
|
||||
size: widget.iconSize,
|
||||
)
|
||||
: Obx(
|
||||
() => Icon(
|
||||
widget.icon,
|
||||
color: hover.value && widget.isClose
|
||||
? Colors.white
|
||||
: MyTheme.tabbar(context).unSelectedIconColor,
|
||||
size: widget.iconSize,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user