remote menubar theme

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2023-02-23 21:31:00 +08:00
parent 4338451f6f
commit f5edf44f0f

View File

@ -408,18 +408,32 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
),
child: SingleChildScrollView(
scrollDirection: Axis.horizontal,
child: MenuBar(
children: [
SizedBox(width: _MenubarTheme.buttonHMargin),
...menubarItems,
SizedBox(width: _MenubarTheme.buttonHMargin)
],
child: Theme(
data: themeData(),
child: MenuBar(
children: [
SizedBox(width: _MenubarTheme.buttonHMargin),
...menubarItems,
SizedBox(width: _MenubarTheme.buttonHMargin)
],
),
)),
),
_buildDraggableShowHide(context),
],
);
}
ThemeData themeData() {
return Theme.of(context).copyWith(
menuButtonTheme: MenuButtonThemeData(
style: ButtonStyle(
minimumSize: MaterialStatePropertyAll(Size(64, 36)),
textStyle: MaterialStatePropertyAll(
TextStyle(fontWeight: FontWeight.normal)))),
dividerTheme: DividerThemeData(space: 4),
);
}
}
class _PinMenu extends StatelessWidget {