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( child: SingleChildScrollView(
scrollDirection: Axis.horizontal, scrollDirection: Axis.horizontal,
child: Theme(
data: themeData(),
child: MenuBar( child: MenuBar(
children: [ children: [
SizedBox(width: _MenubarTheme.buttonHMargin), SizedBox(width: _MenubarTheme.buttonHMargin),
...menubarItems, ...menubarItems,
SizedBox(width: _MenubarTheme.buttonHMargin) SizedBox(width: _MenubarTheme.buttonHMargin)
], ],
),
)), )),
), ),
_buildDraggableShowHide(context), _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 { class _PinMenu extends StatelessWidget {