mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-13 11:35:56 +00:00
fix ab style
This commit is contained in:
@@ -313,7 +313,7 @@ class _PeerCardState extends State<_PeerCard>
|
||||
_menuPos = RelativeRect.fromLTRB(x, y, x, y);
|
||||
},
|
||||
onPointerUp: (_) => _showPeerMenu(peer.id),
|
||||
child: ActionMore());
|
||||
child: build_more(context));
|
||||
|
||||
/// Show the peer menu and handle user's choice.
|
||||
/// User might remove the peer or send a file to the peer.
|
||||
@@ -1226,28 +1226,28 @@ Widget getOnline(double rightPadding, bool online) {
|
||||
radius: 3, backgroundColor: online ? Colors.green : kColorWarn)));
|
||||
}
|
||||
|
||||
class ActionMore extends StatelessWidget {
|
||||
final RxBool _hover = false.obs;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return InkWell(
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
onTap: () {},
|
||||
onHover: (value) => _hover.value = value,
|
||||
child: Obx(() => CircleAvatar(
|
||||
radius: 14,
|
||||
backgroundColor: _hover.value
|
||||
? Theme.of(context).scaffoldBackgroundColor
|
||||
: Theme.of(context).colorScheme.background,
|
||||
child: Icon(Icons.more_vert,
|
||||
size: 18,
|
||||
color: _hover.value
|
||||
? Theme.of(context).textTheme.titleLarge?.color
|
||||
: Theme.of(context)
|
||||
.textTheme
|
||||
.titleLarge
|
||||
?.color
|
||||
?.withOpacity(0.5)))));
|
||||
}
|
||||
Widget build_more(BuildContext context, {bool invert = false}) {
|
||||
final RxBool hover = false.obs;
|
||||
return InkWell(
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
onTap: () {},
|
||||
onHover: (value) => hover.value = value,
|
||||
child: Obx(() => CircleAvatar(
|
||||
radius: 14,
|
||||
backgroundColor: hover.value
|
||||
? (invert
|
||||
? Theme.of(context).colorScheme.background
|
||||
: Theme.of(context).scaffoldBackgroundColor)
|
||||
: (invert
|
||||
? Theme.of(context).scaffoldBackgroundColor
|
||||
: Theme.of(context).colorScheme.background),
|
||||
child: Icon(Icons.more_vert,
|
||||
size: 18,
|
||||
color: hover.value
|
||||
? Theme.of(context).textTheme.titleLarge?.color
|
||||
: Theme.of(context)
|
||||
.textTheme
|
||||
.titleLarge
|
||||
?.color
|
||||
?.withOpacity(0.5)))));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user