Skip to content

Commit

Permalink
Reduced footprint of menu bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 committed Jan 22, 2024
1 parent 17b2b9a commit c8abf31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions lib/pages/dashboard_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1122,9 +1122,11 @@ class _DashboardPageState extends State<DashboardPage> with WindowListener {
TextStyle? menuTextStyle = Theme.of(context).textTheme.bodySmall;
TextStyle? footerStyle = Theme.of(context).textTheme.bodyMedium;
ButtonStyle menuButtonStyle = ButtonStyle(
alignment: Alignment.center,
textStyle: MaterialStateProperty.all(menuTextStyle),
backgroundColor:
const MaterialStatePropertyAll(Color.fromARGB(255, 25, 25, 25)),
iconSize: const MaterialStatePropertyAll(20.0),
);

MenuBar menuBar = MenuBar(
Expand Down Expand Up @@ -1279,11 +1281,10 @@ class _DashboardPageState extends State<DashboardPage> with WindowListener {
message: 'Unlock Layout',
child: MenuItemButton(
style: menuButtonStyle.copyWith(
alignment: Alignment.center,
minimumSize:
const MaterialStatePropertyAll(Size(40.0, double.infinity)),
const MaterialStatePropertyAll(Size(36.0, double.infinity)),
maximumSize:
const MaterialStatePropertyAll(Size(40.0, double.infinity)),
const MaterialStatePropertyAll(Size(36.0, double.infinity)),
),
onPressed: () {
setState(() {
Expand Down
4 changes: 2 additions & 2 deletions lib/widgets/custom_appbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CustomAppBar extends AppBar {
final MenuBar menuBar;
final VoidCallback? onWindowClose;

static const double _leadingSize = 515;
static const double _leadingSize = 500;
static const ThemeType buttonType = ThemeType.materia;

CustomAppBar(
Expand All @@ -21,7 +21,7 @@ class CustomAppBar extends AppBar {
this.onWindowClose,
required this.menuBar})
: super(
toolbarHeight: 40,
toolbarHeight: 36,
backgroundColor: appBarColor ?? const Color.fromARGB(255, 25, 25, 25),
elevation: 0.0,
scrolledUnderElevation: 0.0,
Expand Down

0 comments on commit c8abf31

Please sign in to comment.