flutter: app_theme.dart: Remove some styles
This commit is contained in:
parent
46ddc5aecd
commit
e8a62bfbc6
|
@ -32,11 +32,18 @@ class AppTheme {
|
|||
static var lightBackgroundColor = UIColors.papayaWhip;
|
||||
static var listTileSubtitleColor = Color(0x99461220);
|
||||
static var listItemDividerColor = Color(0x336D000D);
|
||||
static var switchListTileActiveColor = dialogTitleColor;
|
||||
static var switchListTileTitleColor = UIColors.crusoe;
|
||||
static const cardColor = UIColors.floralWhite;
|
||||
static const settingsHeaderTextColor = UIColors.crusoe;
|
||||
|
||||
/// Help page
|
||||
static var helpBackgroundColor = boardBackgroundColor;
|
||||
static var helpTextColor = boardBackgroundColor;
|
||||
|
||||
/// About
|
||||
static var aboutPageBackgroundColor = lightBackgroundColor;
|
||||
|
||||
/// Drawer
|
||||
static var drawerColor = Colors.white;
|
||||
static var drawerBackgroundColor = UIColors.notWhite.withOpacity(0.5); // TODO
|
||||
|
@ -63,39 +70,6 @@ class AppTheme {
|
|||
Colors.red,
|
||||
];
|
||||
|
||||
// Style
|
||||
|
||||
static var gamePageTipStyle = TextStyle(fontSize: 16, color: tipTextColor);
|
||||
|
||||
static const cardColor = UIColors.floralWhite;
|
||||
static const cardMargin =
|
||||
const EdgeInsets.symmetric(vertical: 4.0, horizontal: 0);
|
||||
|
||||
static const settingsHeaderStyle =
|
||||
TextStyle(color: UIColors.crusoe, fontSize: 20.0);
|
||||
|
||||
static var switchListTileActiveColor = dialogTitleColor;
|
||||
static var switchListTileTitleStyle = TextStyle(color: UIColors.crusoe);
|
||||
|
||||
static var moveHistoryTextStyle =
|
||||
TextStyle(fontSize: 18, height: 1.5, color: moveHistoryTextColor);
|
||||
|
||||
static var aboutPageBackgroundColor = lightBackgroundColor;
|
||||
|
||||
static double copyrightFontSize = 12;
|
||||
static var versionDialogAppNameTextStyle = TextStyle(color: dialogTitleColor);
|
||||
static var versionDialogCopyrightTextStyle = TextStyle(
|
||||
fontSize: AppTheme.copyrightFontSize,
|
||||
);
|
||||
|
||||
static double boardBorderRadius = 5;
|
||||
static var boardPadding = 5.0;
|
||||
|
||||
static const double drawerWidth = 250;
|
||||
|
||||
static double boardMargin = 10.0;
|
||||
static var boardScreenPaddingH = 10.0;
|
||||
|
||||
// Theme
|
||||
|
||||
static const sliderThemeData = SliderThemeData(
|
||||
|
@ -119,6 +93,27 @@ class AppTheme {
|
|||
valueIndicatorTextStyle: TextStyle(fontSize: 24),
|
||||
);
|
||||
|
||||
// Misc
|
||||
static const SizedBox sizedBox = SizedBox(height: 16);
|
||||
// Style
|
||||
|
||||
static var moveHistoryTextStyle =
|
||||
TextStyle(fontSize: 18, height: 1.5, color: moveHistoryTextColor);
|
||||
|
||||
static double boardMargin = 10.0;
|
||||
static double boardScreenPaddingH = 10.0;
|
||||
static double boardBorderRadius = 5.0;
|
||||
static double boardPadding = 5.0;
|
||||
|
||||
static var gamePageTipStyle = TextStyle(fontSize: 16, color: tipTextColor);
|
||||
|
||||
static const settingsHeaderStyle =
|
||||
TextStyle(color: settingsHeaderTextColor, fontSize: 20.0);
|
||||
|
||||
static const cardMargin =
|
||||
const EdgeInsets.symmetric(vertical: 4.0, horizontal: 0);
|
||||
|
||||
static const double drawerWidth = 250.0;
|
||||
|
||||
static const double sizedBoxHeight = 16.0;
|
||||
|
||||
static double copyrightFontSize = 12;
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ class _AboutPageState extends State<AboutPage> {
|
|||
/*
|
||||
ListTile(
|
||||
title: Text(S.of(context).viewInGooglePlayStore,
|
||||
style: AppTheme.switchListTileTitleStyle),
|
||||
style: TextStyle(color: AppTheme.switchListTileTitleColor)),
|
||||
onTap: () => _launchURL(
|
||||
'https://play.google.com/store/apps/details?id=com.calcitem.sanmill'),
|
||||
),
|
||||
|
@ -172,18 +172,20 @@ class _AboutPageState extends State<AboutPage> {
|
|||
return AlertDialog(
|
||||
title: Text(
|
||||
S.of(context).appName,
|
||||
style: AppTheme.versionDialogAppNameTextStyle,
|
||||
style: TextStyle(color: AppTheme.dialogTitleColor),
|
||||
),
|
||||
content: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: <Widget>[
|
||||
Text(S.of(context).version + ": $_version"),
|
||||
AppTheme.sizedBox,
|
||||
AppTheme.sizedBox,
|
||||
SizedBox(height: AppTheme.sizedBoxHeight),
|
||||
SizedBox(height: AppTheme.sizedBoxHeight),
|
||||
Text(
|
||||
S.of(context).copyright,
|
||||
style: AppTheme.versionDialogCopyrightTextStyle,
|
||||
style: TextStyle(
|
||||
fontSize: AppTheme.copyrightFontSize,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
|
|
@ -127,7 +127,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
|||
),
|
||||
],
|
||||
),
|
||||
AppTheme.sizedBox,
|
||||
SizedBox(height: AppTheme.sizedBoxHeight),
|
||||
Text(S.of(context).aisPlayStyle, style: AppTheme.settingsHeaderStyle),
|
||||
SettingsCard(
|
||||
context: context,
|
||||
|
@ -147,7 +147,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
|||
),
|
||||
],
|
||||
),
|
||||
AppTheme.sizedBox,
|
||||
SizedBox(height: AppTheme.sizedBoxHeight),
|
||||
Text(S.of(context).playSounds, style: AppTheme.settingsHeaderStyle),
|
||||
SettingsCard(
|
||||
context: context,
|
||||
|
@ -160,7 +160,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
|||
),
|
||||
],
|
||||
),
|
||||
AppTheme.sizedBox,
|
||||
SizedBox(height: AppTheme.sizedBoxHeight),
|
||||
Text(S.of(context).whoMovesFirst, style: AppTheme.settingsHeaderStyle),
|
||||
SettingsCard(
|
||||
context: context,
|
||||
|
@ -174,7 +174,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
|||
),
|
||||
],
|
||||
),
|
||||
AppTheme.sizedBox,
|
||||
SizedBox(height: AppTheme.sizedBoxHeight),
|
||||
Text(S.of(context).automaticBehavior,
|
||||
style: AppTheme.settingsHeaderStyle),
|
||||
SettingsCard(
|
||||
|
@ -188,7 +188,7 @@ class _GameSettingsPageState extends State<GameSettingsPage> {
|
|||
),
|
||||
],
|
||||
),
|
||||
AppTheme.sizedBox,
|
||||
SizedBox(height: AppTheme.sizedBoxHeight),
|
||||
Text(S.of(context).restore, style: AppTheme.settingsHeaderStyle),
|
||||
SettingsCard(
|
||||
context: context,
|
||||
|
|
|
@ -25,7 +25,7 @@ class _HelpScreenState extends State<HelpScreen> {
|
|||
backgroundColor: Color(Config.darkBackgroundColor),
|
||||
body: ListView(
|
||||
children: <Widget>[
|
||||
AppTheme.sizedBox,
|
||||
SizedBox(height: AppTheme.sizedBoxHeight),
|
||||
Container(
|
||||
padding: const EdgeInsets.only(
|
||||
top: 48, left: 16, right: 16, bottom: 16),
|
||||
|
|
|
@ -212,7 +212,7 @@ class _PersonalizationSettingsPageState
|
|||
),
|
||||
],
|
||||
),
|
||||
AppTheme.sizedBox,
|
||||
SizedBox(height: AppTheme.sizedBoxHeight),
|
||||
Text(S.of(context).color, style: AppTheme.settingsHeaderStyle),
|
||||
SettingsCard(
|
||||
context: context,
|
||||
|
|
|
@ -228,7 +228,7 @@ class _RuleSettingsPageState extends State<RuleSettingsPage> {
|
|||
*/
|
||||
],
|
||||
),
|
||||
AppTheme.sizedBox,
|
||||
SizedBox(height: AppTheme.sizedBoxHeight),
|
||||
Text(S.of(context).placing, style: AppTheme.settingsHeaderStyle),
|
||||
SettingsCard(
|
||||
context: context,
|
||||
|
@ -251,7 +251,7 @@ class _RuleSettingsPageState extends State<RuleSettingsPage> {
|
|||
),
|
||||
],
|
||||
),
|
||||
AppTheme.sizedBox,
|
||||
SizedBox(height: AppTheme.sizedBoxHeight),
|
||||
Text(S.of(context).moving, style: AppTheme.settingsHeaderStyle),
|
||||
SettingsCard(
|
||||
context: context,
|
||||
|
@ -274,7 +274,7 @@ class _RuleSettingsPageState extends State<RuleSettingsPage> {
|
|||
),
|
||||
],
|
||||
),
|
||||
AppTheme.sizedBox,
|
||||
SizedBox(height: AppTheme.sizedBoxHeight),
|
||||
Text(S.of(context).removing, style: AppTheme.settingsHeaderStyle),
|
||||
SettingsCard(
|
||||
context: context,
|
||||
|
|
|
@ -40,7 +40,8 @@ class SettingsListTile extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListTile(
|
||||
title: Text(titleString, style: AppTheme.switchListTileTitleStyle),
|
||||
title: Text(titleString,
|
||||
style: TextStyle(color: AppTheme.switchListTileTitleColor)),
|
||||
subtitle: subtitleString == null
|
||||
? null
|
||||
: Text(
|
||||
|
|
|
@ -41,7 +41,8 @@ class SettingsSwitchListTile extends StatelessWidget {
|
|||
value: value,
|
||||
onChanged: onChanged,
|
||||
activeColor: AppTheme.switchListTileActiveColor,
|
||||
title: Text(titleString, style: AppTheme.switchListTileTitleStyle),
|
||||
title: Text(titleString,
|
||||
style: TextStyle(color: AppTheme.switchListTileTitleColor)),
|
||||
subtitle: subtitleString == null
|
||||
? null
|
||||
: Text(
|
||||
|
|
Loading…
Reference in New Issue