Fix. Remote toolbar, menu refresh (#7605)
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
parent
129548764e
commit
2397fdc495
@ -636,7 +636,7 @@ class _MonitorMenu extends StatelessWidget {
|
||||
menuStyle: MenuStyle(
|
||||
padding:
|
||||
MaterialStatePropertyAll(EdgeInsets.symmetric(horizontal: 6))),
|
||||
menuChildren: [buildMonitorSubmenuWidget()]);
|
||||
menuChildrenGetter: () => [buildMonitorSubmenuWidget()]);
|
||||
}
|
||||
|
||||
Widget buildMultiMonitorMenu() {
|
||||
@ -843,7 +843,7 @@ class _ControlMenu extends StatelessWidget {
|
||||
color: _ToolbarTheme.blueColor,
|
||||
hoverColor: _ToolbarTheme.hoverBlueColor,
|
||||
ffi: ffi,
|
||||
menuChildren: toolbarControls(context, id, ffi).map((e) {
|
||||
menuChildrenGetter: () => toolbarControls(context, id, ffi).map((e) {
|
||||
if (e.divider) {
|
||||
return Divider();
|
||||
} else {
|
||||
@ -1046,6 +1046,7 @@ class _DisplayMenuState extends State<_DisplayMenu> {
|
||||
Widget build(BuildContext context) {
|
||||
_screenAdjustor.updateScreen();
|
||||
|
||||
menuChildrenGetter() {
|
||||
final menuChildren = <Widget>[
|
||||
_screenAdjustor.adjustWindow(context),
|
||||
viewStyle(),
|
||||
@ -1093,6 +1094,8 @@ class _DisplayMenuState extends State<_DisplayMenu> {
|
||||
}
|
||||
}
|
||||
menuChildren.add(widget.pluginItem);
|
||||
return menuChildren;
|
||||
}
|
||||
|
||||
return _IconSubmenuButton(
|
||||
tooltip: 'Display Settings',
|
||||
@ -1100,7 +1103,7 @@ class _DisplayMenuState extends State<_DisplayMenu> {
|
||||
ffi: widget.ffi,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
hoverColor: _ToolbarTheme.hoverBlueColor,
|
||||
menuChildren: menuChildren,
|
||||
menuChildrenGetter: menuChildrenGetter,
|
||||
);
|
||||
}
|
||||
|
||||
@ -1645,7 +1648,7 @@ class _KeyboardMenu extends StatelessWidget {
|
||||
ffi: ffi,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
hoverColor: _ToolbarTheme.hoverBlueColor,
|
||||
menuChildren: [
|
||||
menuChildrenGetter: () => [
|
||||
keyboardMode(modeOnly),
|
||||
localKeyboardType(),
|
||||
inputSource(),
|
||||
@ -1804,7 +1807,7 @@ class _ChatMenuState extends State<_ChatMenu> {
|
||||
ffi: widget.ffi,
|
||||
color: _ToolbarTheme.blueColor,
|
||||
hoverColor: _ToolbarTheme.hoverBlueColor,
|
||||
menuChildren: [textChat(), voiceCall()]);
|
||||
menuChildrenGetter: () => [textChat(), voiceCall()]);
|
||||
}
|
||||
|
||||
textChat() {
|
||||
@ -2008,7 +2011,7 @@ class _IconSubmenuButton extends StatefulWidget {
|
||||
final Widget? icon;
|
||||
final Color color;
|
||||
final Color hoverColor;
|
||||
final List<Widget> menuChildren;
|
||||
final List<Widget> Function() menuChildrenGetter;
|
||||
final MenuStyle? menuStyle;
|
||||
final FFI ffi;
|
||||
final double? width;
|
||||
@ -2020,7 +2023,7 @@ class _IconSubmenuButton extends StatefulWidget {
|
||||
required this.tooltip,
|
||||
required this.color,
|
||||
required this.hoverColor,
|
||||
required this.menuChildren,
|
||||
required this.menuChildrenGetter,
|
||||
required this.ffi,
|
||||
this.menuStyle,
|
||||
this.width,
|
||||
@ -2064,7 +2067,8 @@ class _IconSubmenuButtonState extends State<_IconSubmenuButton> {
|
||||
color: hover ? widget.hoverColor : widget.color,
|
||||
),
|
||||
child: icon))),
|
||||
menuChildren: widget.menuChildren
|
||||
menuChildren: widget
|
||||
.menuChildrenGetter()
|
||||
.map((e) => _buildPointerTrackWidget(e, widget.ffi))
|
||||
.toList()));
|
||||
return MenuBar(children: [
|
||||
|
Loading…
x
Reference in New Issue
Block a user