Skip to content

Commit

Permalink
Fix scaling for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
z80maniac committed Jun 16, 2024
1 parent 4e7ad90 commit 5366db5
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions lib/widgets/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,34 @@ class App extends StatelessWidget {
brightness: Brightness.dark,
);

return MaterialApp(
title: 'GrabLog',
theme: ThemeData(
brightness: Brightness.light,
colorScheme: lightScheme,
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(foregroundColor: lightScheme.onPrimaryContainer)
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(foregroundColor: lightScheme.onPrimaryContainer)
)
return MediaQuery(
data: MediaQuery.of(context).copyWith(
textScaler: TextScaler.noScaling,
),
darkTheme: ThemeData(
brightness: Brightness.dark,
colorScheme: darkScheme,
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(foregroundColor: darkScheme.onPrimaryContainer)
child: MaterialApp(
title: 'GrabLog',
theme: ThemeData(
brightness: Brightness.light,
colorScheme: lightScheme,
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(foregroundColor: lightScheme.onPrimaryContainer)
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(foregroundColor: lightScheme.onPrimaryContainer)
)
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(foregroundColor: darkScheme.onPrimaryContainer)
)
),
//themeMode: ThemeMode.light,
home: Home(cliArgs),
darkTheme: ThemeData(
brightness: Brightness.dark,
colorScheme: darkScheme,
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(foregroundColor: darkScheme.onPrimaryContainer)
),
textButtonTheme: TextButtonThemeData(
style: TextButton.styleFrom(foregroundColor: darkScheme.onPrimaryContainer)
)
),
home: Home(cliArgs),
)
);
}

Expand Down

0 comments on commit 5366db5

Please sign in to comment.