not show menubar tooltip
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
bb201a47cb
commit
d28aa6eeb0
@ -516,6 +516,7 @@ class _MonitorMenu extends StatelessWidget {
|
|||||||
return Offstage();
|
return Offstage();
|
||||||
}
|
}
|
||||||
return _IconSubmenuButton(
|
return _IconSubmenuButton(
|
||||||
|
tooltip: 'Select Monitor',
|
||||||
icon: icon(),
|
icon: icon(),
|
||||||
ffi: ffi,
|
ffi: ffi,
|
||||||
color: _MenubarTheme.blueColor,
|
color: _MenubarTheme.blueColor,
|
||||||
@ -607,6 +608,7 @@ class _ControlMenu extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return _IconSubmenuButton(
|
return _IconSubmenuButton(
|
||||||
|
tooltip: 'Control Actions',
|
||||||
svg: "assets/actions.svg",
|
svg: "assets/actions.svg",
|
||||||
color: _MenubarTheme.blueColor,
|
color: _MenubarTheme.blueColor,
|
||||||
hoverColor: _MenubarTheme.hoverBlueColor,
|
hoverColor: _MenubarTheme.hoverBlueColor,
|
||||||
@ -928,6 +930,7 @@ class _DisplayMenuState extends State<_DisplayMenu> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
_updateScreen();
|
_updateScreen();
|
||||||
return _IconSubmenuButton(
|
return _IconSubmenuButton(
|
||||||
|
tooltip: 'Display Settings',
|
||||||
svg: "assets/display.svg",
|
svg: "assets/display.svg",
|
||||||
ffi: widget.ffi,
|
ffi: widget.ffi,
|
||||||
color: _MenubarTheme.blueColor,
|
color: _MenubarTheme.blueColor,
|
||||||
@ -1611,6 +1614,7 @@ class _KeyboardMenu extends StatelessWidget {
|
|||||||
return Offstage();
|
return Offstage();
|
||||||
}
|
}
|
||||||
return _IconSubmenuButton(
|
return _IconSubmenuButton(
|
||||||
|
tooltip: 'Keyboard Settings',
|
||||||
svg: "assets/keyboard.svg",
|
svg: "assets/keyboard.svg",
|
||||||
ffi: ffi,
|
ffi: ffi,
|
||||||
color: _MenubarTheme.blueColor,
|
color: _MenubarTheme.blueColor,
|
||||||
@ -1698,6 +1702,7 @@ class _ChatMenuState extends State<_ChatMenu> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return _IconSubmenuButton(
|
return _IconSubmenuButton(
|
||||||
|
tooltip: 'Chat',
|
||||||
key: chatButtonKey,
|
key: chatButtonKey,
|
||||||
svg: 'assets/chat.svg',
|
svg: 'assets/chat.svg',
|
||||||
ffi: widget.ffi,
|
ffi: widget.ffi,
|
||||||
@ -1816,7 +1821,7 @@ class _CloseMenu extends StatelessWidget {
|
|||||||
class _IconMenuButton extends StatefulWidget {
|
class _IconMenuButton extends StatefulWidget {
|
||||||
final String? assetName;
|
final String? assetName;
|
||||||
final Widget? icon;
|
final Widget? icon;
|
||||||
final String tooltip;
|
final String? tooltip;
|
||||||
final Color color;
|
final Color color;
|
||||||
final Color hoverColor;
|
final Color hoverColor;
|
||||||
final VoidCallback? onPressed;
|
final VoidCallback? onPressed;
|
||||||
@ -1827,7 +1832,7 @@ class _IconMenuButton extends StatefulWidget {
|
|||||||
Key? key,
|
Key? key,
|
||||||
this.assetName,
|
this.assetName,
|
||||||
this.icon,
|
this.icon,
|
||||||
required this.tooltip,
|
this.tooltip,
|
||||||
required this.color,
|
required this.color,
|
||||||
required this.hoverColor,
|
required this.hoverColor,
|
||||||
required this.onPressed,
|
required this.onPressed,
|
||||||
@ -1864,17 +1869,14 @@ class _IconMenuButtonState extends State<_IconMenuButton> {
|
|||||||
hover = value;
|
hover = value;
|
||||||
}),
|
}),
|
||||||
onPressed: widget.onPressed,
|
onPressed: widget.onPressed,
|
||||||
child: Tooltip(
|
|
||||||
message: translate(widget.tooltip),
|
|
||||||
child: Material(
|
child: Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: Ink(
|
child: Ink(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius:
|
borderRadius: BorderRadius.circular(_MenubarTheme.iconRadius),
|
||||||
BorderRadius.circular(_MenubarTheme.iconRadius),
|
|
||||||
color: hover ? widget.hoverColor : widget.color,
|
color: hover ? widget.hoverColor : widget.color,
|
||||||
),
|
),
|
||||||
child: icon))),
|
child: icon)),
|
||||||
),
|
),
|
||||||
).marginSymmetric(
|
).marginSymmetric(
|
||||||
horizontal: widget.hMargin ?? _MenubarTheme.buttonHMargin,
|
horizontal: widget.hMargin ?? _MenubarTheme.buttonHMargin,
|
||||||
@ -1888,6 +1890,7 @@ class _IconMenuButtonState extends State<_IconMenuButton> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class _IconSubmenuButton extends StatefulWidget {
|
class _IconSubmenuButton extends StatefulWidget {
|
||||||
|
final String tooltip;
|
||||||
final String? svg;
|
final String? svg;
|
||||||
final Widget? icon;
|
final Widget? icon;
|
||||||
final Color color;
|
final Color color;
|
||||||
@ -1900,6 +1903,7 @@ class _IconSubmenuButton extends StatefulWidget {
|
|||||||
{Key? key,
|
{Key? key,
|
||||||
this.svg,
|
this.svg,
|
||||||
this.icon,
|
this.icon,
|
||||||
|
required this.tooltip,
|
||||||
required this.color,
|
required this.color,
|
||||||
required this.hoverColor,
|
required this.hoverColor,
|
||||||
required this.menuChildren,
|
required this.menuChildren,
|
||||||
@ -1946,11 +1950,12 @@ class _IconSubmenuButtonState extends State<_IconSubmenuButton> {
|
|||||||
child: icon)),
|
child: icon)),
|
||||||
menuChildren: widget.menuChildren
|
menuChildren: widget.menuChildren
|
||||||
.map((e) => _buildPointerTrackWidget(e, widget.ffi))
|
.map((e) => _buildPointerTrackWidget(e, widget.ffi))
|
||||||
.toList()))
|
.toList()));
|
||||||
.marginSymmetric(
|
return MenuBar(children: [
|
||||||
|
button.marginSymmetric(
|
||||||
horizontal: _MenubarTheme.buttonHMargin,
|
horizontal: _MenubarTheme.buttonHMargin,
|
||||||
vertical: _MenubarTheme.buttonVMargin);
|
vertical: _MenubarTheme.buttonVMargin)
|
||||||
return MenuBar(children: [button]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user