mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-06-11 12:43:12 +08:00
chore
This commit is contained in:
parent
da1d3466b7
commit
c099ff2d8b
@ -197,17 +197,19 @@ class _PeerTabPageState extends State<PeerTabPage>
|
|||||||
|
|
||||||
Widget _createPeerViewTypeSwitch(BuildContext context) {
|
Widget _createPeerViewTypeSwitch(BuildContext context) {
|
||||||
final textColor = Theme.of(context).textTheme.titleLarge?.color;
|
final textColor = Theme.of(context).textTheme.titleLarge?.color;
|
||||||
|
final types = [PeerUiType.grid, PeerUiType.list];
|
||||||
|
final hover = false.obs;
|
||||||
final deco = BoxDecoration(
|
final deco = BoxDecoration(
|
||||||
color: Theme.of(context).colorScheme.background,
|
color: Theme.of(context).colorScheme.background,
|
||||||
borderRadius: BorderRadius.circular(5),
|
borderRadius: BorderRadius.circular(5),
|
||||||
);
|
);
|
||||||
final types = [PeerUiType.grid, PeerUiType.list];
|
|
||||||
|
|
||||||
return Obx(
|
return Obx(
|
||||||
() => Container(
|
() => Container(
|
||||||
padding: EdgeInsets.all(4.0),
|
padding: EdgeInsets.all(4.0),
|
||||||
decoration: deco,
|
decoration: hover.value ? deco : null,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
|
onHover: (value) => hover.value = value,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
final type = types.elementAt(
|
final type = types.elementAt(
|
||||||
peerCardUiType.value == types.elementAt(0) ? 1 : 0);
|
peerCardUiType.value == types.elementAt(0) ? 1 : 0);
|
||||||
@ -217,7 +219,7 @@ class _PeerTabPageState extends State<PeerTabPage>
|
|||||||
},
|
},
|
||||||
child: Icon(
|
child: Icon(
|
||||||
peerCardUiType.value == PeerUiType.grid
|
peerCardUiType.value == PeerUiType.grid
|
||||||
? Icons.list
|
? Icons.view_list_rounded
|
||||||
: Icons.grid_view_rounded,
|
: Icons.grid_view_rounded,
|
||||||
size: 18,
|
size: 18,
|
||||||
color: textColor,
|
color: textColor,
|
||||||
|
Loading…
Reference in New Issue
Block a user