fix remote menubar theme
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
fc9b2d60e3
commit
fc8e3df7dc
@ -252,6 +252,9 @@ class MyTheme {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
menuBarTheme: MenuBarThemeData(
|
||||||
|
style:
|
||||||
|
MenuStyle(backgroundColor: MaterialStatePropertyAll(Colors.white))),
|
||||||
colorScheme: ColorScheme.light(
|
colorScheme: ColorScheme.light(
|
||||||
primary: Colors.blue, secondary: accent, background: grayBg),
|
primary: Colors.blue, secondary: accent, background: grayBg),
|
||||||
).copyWith(
|
).copyWith(
|
||||||
@ -352,6 +355,9 @@ class MyTheme {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
menuBarTheme: MenuBarThemeData(
|
||||||
|
style: MenuStyle(
|
||||||
|
backgroundColor: MaterialStatePropertyAll(Color(0xFF121212)))),
|
||||||
colorScheme: ColorScheme.dark(
|
colorScheme: ColorScheme.dark(
|
||||||
primary: Colors.blue,
|
primary: Colors.blue,
|
||||||
secondary: accent,
|
secondary: accent,
|
||||||
|
@ -408,7 +408,12 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
|||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.all(Radius.circular(10)),
|
borderRadius: BorderRadius.all(Radius.circular(4.0)),
|
||||||
|
color: Theme.of(context)
|
||||||
|
.menuBarTheme
|
||||||
|
.style
|
||||||
|
?.backgroundColor
|
||||||
|
?.resolve(MaterialState.values.toSet()),
|
||||||
),
|
),
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
@ -416,9 +421,9 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
|||||||
data: themeData(),
|
data: themeData(),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: _MenubarTheme.buttonHMargin),
|
SizedBox(width: _MenubarTheme.buttonHMargin * 2),
|
||||||
...menubarItems,
|
...menubarItems,
|
||||||
SizedBox(width: _MenubarTheme.buttonHMargin)
|
SizedBox(width: _MenubarTheme.buttonHMargin * 2)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -441,7 +446,13 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
|||||||
),
|
),
|
||||||
dividerTheme: DividerThemeData(space: 4),
|
dividerTheme: DividerThemeData(space: 4),
|
||||||
menuBarTheme: MenuBarThemeData(
|
menuBarTheme: MenuBarThemeData(
|
||||||
style: MenuStyle(padding: MaterialStatePropertyAll(EdgeInsets.zero))),
|
style: MenuStyle(
|
||||||
|
padding: MaterialStatePropertyAll(EdgeInsets.zero),
|
||||||
|
elevation: MaterialStatePropertyAll(0),
|
||||||
|
shape: MaterialStatePropertyAll(BeveledRectangleBorder()),
|
||||||
|
).copyWith(
|
||||||
|
backgroundColor:
|
||||||
|
Theme.of(context).menuBarTheme.style?.backgroundColor)),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1863,6 +1874,7 @@ class _IconMenuButtonState extends State<_IconMenuButton> {
|
|||||||
height: _MenubarTheme.buttonSize,
|
height: _MenubarTheme.buttonSize,
|
||||||
child: MenuItemButton(
|
child: MenuItemButton(
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
|
backgroundColor: MaterialStatePropertyAll(Colors.transparent),
|
||||||
padding: MaterialStatePropertyAll(EdgeInsets.zero),
|
padding: MaterialStatePropertyAll(EdgeInsets.zero),
|
||||||
overlayColor: MaterialStatePropertyAll(Colors.transparent)),
|
overlayColor: MaterialStatePropertyAll(Colors.transparent)),
|
||||||
onHover: (value) => setState(() {
|
onHover: (value) => setState(() {
|
||||||
@ -1934,6 +1946,7 @@ class _IconSubmenuButtonState extends State<_IconSubmenuButton> {
|
|||||||
child: SubmenuButton(
|
child: SubmenuButton(
|
||||||
menuStyle: widget.menuStyle,
|
menuStyle: widget.menuStyle,
|
||||||
style: ButtonStyle(
|
style: ButtonStyle(
|
||||||
|
backgroundColor: MaterialStatePropertyAll(Colors.transparent),
|
||||||
padding: MaterialStatePropertyAll(EdgeInsets.zero),
|
padding: MaterialStatePropertyAll(EdgeInsets.zero),
|
||||||
overlayColor: MaterialStatePropertyAll(Colors.transparent)),
|
overlayColor: MaterialStatePropertyAll(Colors.transparent)),
|
||||||
onHover: (value) => setState(() {
|
onHover: (value) => setState(() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user