ui fixes
This commit is contained in:
parent
0a1c5a44e3
commit
b54c8824f0
5 changed files with 44 additions and 99 deletions
|
@ -10,17 +10,6 @@ class Themes {
|
||||||
fontFeatures: [FontFeature.enable('smcp')],
|
fontFeatures: [FontFeature.enable('smcp')],
|
||||||
);
|
);
|
||||||
|
|
||||||
// adapted from M3 defaults
|
|
||||||
static MaterialStateProperty<TextStyle?> _popupMenuTextStyle(ColorScheme colors, TextTheme textTheme) {
|
|
||||||
return MaterialStateProperty.resolveWith((states) {
|
|
||||||
final TextStyle style = textTheme.labelLarge!;
|
|
||||||
if (states.contains(MaterialState.disabled)) {
|
|
||||||
return style.apply(color: colors.onSurface.withOpacity(0.38));
|
|
||||||
}
|
|
||||||
return style.apply(color: colors.onSurface);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
static TextStyle searchFieldStyle(BuildContext context) => Theme.of(context).textTheme.bodyLarge!;
|
static TextStyle searchFieldStyle(BuildContext context) => Theme.of(context).textTheme.bodyLarge!;
|
||||||
|
|
||||||
static Color overlayBackgroundColor({
|
static Color overlayBackgroundColor({
|
||||||
|
@ -83,6 +72,20 @@ class Themes {
|
||||||
contentPadding: EdgeInsets.symmetric(horizontal: 16),
|
contentPadding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
static PopupMenuThemeData _popupMenuTheme(ColorScheme colors, TextTheme textTheme) {
|
||||||
|
return PopupMenuThemeData(
|
||||||
|
labelTextStyle: MaterialStateProperty.resolveWith((states) {
|
||||||
|
// adapted from M3 defaults
|
||||||
|
final TextStyle style = textTheme.labelLarge!;
|
||||||
|
if (states.contains(MaterialState.disabled)) {
|
||||||
|
return style.apply(color: colors.onSurface.withOpacity(0.38));
|
||||||
|
}
|
||||||
|
return style.apply(color: colors.onSurface);
|
||||||
|
}),
|
||||||
|
iconColor: colors.onSurface,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// adapted from M3 defaults
|
// adapted from M3 defaults
|
||||||
static RadioThemeData _radioTheme(ColorScheme colors) => RadioThemeData(
|
static RadioThemeData _radioTheme(ColorScheme colors) => RadioThemeData(
|
||||||
fillColor: MaterialStateProperty.resolveWith<Color>((states) {
|
fillColor: MaterialStateProperty.resolveWith<Color>((states) {
|
||||||
|
@ -158,9 +161,7 @@ class Themes {
|
||||||
listTileTheme: _listTileTheme.copyWith(
|
listTileTheme: _listTileTheme.copyWith(
|
||||||
iconColor: _lightActionIconColor,
|
iconColor: _lightActionIconColor,
|
||||||
),
|
),
|
||||||
popupMenuTheme: PopupMenuThemeData(
|
popupMenuTheme: _popupMenuTheme(colors, textTheme),
|
||||||
labelTextStyle: _popupMenuTextStyle(colors, textTheme),
|
|
||||||
),
|
|
||||||
snackBarTheme: _snackBarTheme(colors),
|
snackBarTheme: _snackBarTheme(colors),
|
||||||
switchTheme: SwitchThemeData(
|
switchTheme: SwitchThemeData(
|
||||||
thumbColor: MaterialStateProperty.resolveWith<Color>((states) {
|
thumbColor: MaterialStateProperty.resolveWith<Color>((states) {
|
||||||
|
@ -209,9 +210,7 @@ class Themes {
|
||||||
titleTextStyle: _titleTextStyle.copyWith(color: _darkTitleColor),
|
titleTextStyle: _titleTextStyle.copyWith(color: _darkTitleColor),
|
||||||
),
|
),
|
||||||
listTileTheme: _listTileTheme,
|
listTileTheme: _listTileTheme,
|
||||||
popupMenuTheme: PopupMenuThemeData(
|
popupMenuTheme: _popupMenuTheme(colors, textTheme),
|
||||||
labelTextStyle: _popupMenuTextStyle(colors, textTheme),
|
|
||||||
),
|
|
||||||
snackBarTheme: _snackBarTheme(colors).copyWith(
|
snackBarTheme: _snackBarTheme(colors).copyWith(
|
||||||
backgroundColor: _schemeSecondLayer(colors),
|
backgroundColor: _schemeSecondLayer(colors),
|
||||||
contentTextStyle: TextStyle(
|
contentTextStyle: TextStyle(
|
||||||
|
|
|
@ -34,6 +34,8 @@ class SectionHeader<T> extends StatelessWidget {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final onTap = selectable ? () => _toggleSectionSelection(context) : null;
|
final onTap = selectable ? () => _toggleSectionSelection(context) : null;
|
||||||
|
|
||||||
|
final theme = Theme.of(context);
|
||||||
|
|
||||||
Widget child = Container(
|
Widget child = Container(
|
||||||
padding: padding,
|
padding: padding,
|
||||||
constraints: BoxConstraints(minHeight: leadingSize.height),
|
constraints: BoxConstraints(minHeight: leadingSize.height),
|
||||||
|
@ -55,6 +57,12 @@ class SectionHeader<T> extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
WidgetSpan(
|
WidgetSpan(
|
||||||
alignment: widgetSpanAlignment,
|
alignment: widgetSpanAlignment,
|
||||||
|
child: Theme(
|
||||||
|
data: theme.copyWith(
|
||||||
|
iconTheme: theme.iconTheme.copyWith(
|
||||||
|
color: theme.colorScheme.onSurface,
|
||||||
|
),
|
||||||
|
),
|
||||||
child: _SectionSelectableLeading<T>(
|
child: _SectionSelectableLeading<T>(
|
||||||
selectable: selectable,
|
selectable: selectable,
|
||||||
sectionKey: sectionKey,
|
sectionKey: sectionKey,
|
||||||
|
@ -69,6 +77,7 @@ class SectionHeader<T> extends StatelessWidget {
|
||||||
onPressed: onTap,
|
onPressed: onTap,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: title,
|
text: title,
|
||||||
style: AStyles.unknownTitleText,
|
style: AStyles.unknownTitleText,
|
||||||
|
|
|
@ -57,7 +57,7 @@ class AvesExpansionTile extends StatelessWidget {
|
||||||
initiallyExpanded: initiallyExpanded,
|
initiallyExpanded: initiallyExpanded,
|
||||||
finalPadding: const EdgeInsets.symmetric(vertical: 6.0),
|
finalPadding: const EdgeInsets.symmetric(vertical: 6.0),
|
||||||
baseColor: theme.colorScheme.background,
|
baseColor: theme.colorScheme.background,
|
||||||
expandedTextColor: colorScheme.onBackground,
|
expandedTextColor: colorScheme.onSurface,
|
||||||
duration: animationDuration,
|
duration: animationDuration,
|
||||||
shadowColor: theme.shadowColor,
|
shadowColor: theme.shadowColor,
|
||||||
child: Column(
|
child: Column(
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'package:aves/widgets/common/identity/aves_expansion_tile.dart';
|
import 'package:aves/widgets/common/identity/aves_expansion_tile.dart';
|
||||||
|
import 'package:flex_color_picker/flex_color_picker.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class DebugColorSection extends StatefulWidget {
|
class DebugColorSection extends StatefulWidget {
|
||||||
|
@ -58,6 +59,11 @@ class _DebugColorSectionState extends State<DebugColorSection> with AutomaticKee
|
||||||
children: [
|
children: [
|
||||||
Text(text),
|
Text(text),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
|
Text(
|
||||||
|
color.hex,
|
||||||
|
style: const TextStyle(fontFamily: 'monospace'),
|
||||||
|
),
|
||||||
|
const SizedBox(width: 4),
|
||||||
Container(
|
Container(
|
||||||
width: 20,
|
width: 20,
|
||||||
height: 20,
|
height: 20,
|
||||||
|
|
|
@ -7660,75 +7660,6 @@
|
||||||
"tagPlaceholderState"
|
"tagPlaceholderState"
|
||||||
],
|
],
|
||||||
|
|
||||||
"zh": [
|
|
||||||
"chipActionGoToPlacePage",
|
|
||||||
"entryActionCast",
|
|
||||||
"editorTransformCrop",
|
|
||||||
"cropAspectRatioFree",
|
|
||||||
"cropAspectRatioOriginal",
|
|
||||||
"cropAspectRatioSquare",
|
|
||||||
"filterLocatedLabel",
|
|
||||||
"filterTaggedLabel",
|
|
||||||
"albumTierVaults",
|
|
||||||
"lengthUnitPixel",
|
|
||||||
"lengthUnitPercent",
|
|
||||||
"maxBrightnessNever",
|
|
||||||
"maxBrightnessAlways",
|
|
||||||
"overlayHistogramNone",
|
|
||||||
"overlayHistogramLuminance",
|
|
||||||
"vaultLockTypePattern",
|
|
||||||
"vaultLockTypePin",
|
|
||||||
"settingsVideoEnablePip",
|
|
||||||
"videoResumptionModeNever",
|
|
||||||
"videoResumptionModeAlways",
|
|
||||||
"widgetTapUpdateWidget",
|
|
||||||
"newVaultWarningDialogMessage",
|
|
||||||
"newVaultDialogTitle",
|
|
||||||
"configureVaultDialogTitle",
|
|
||||||
"vaultDialogLockModeWhenScreenOff",
|
|
||||||
"vaultDialogLockTypeLabel",
|
|
||||||
"patternDialogEnter",
|
|
||||||
"authenticateToConfigureVault",
|
|
||||||
"authenticateToUnlockVault",
|
|
||||||
"vaultBinUsageDialogMessage",
|
|
||||||
"exportEntryDialogQuality",
|
|
||||||
"exportEntryDialogWriteMetadata",
|
|
||||||
"tooManyItemsErrorDialogMessage",
|
|
||||||
"castDialogTitle",
|
|
||||||
"aboutDataUsageSectionTitle",
|
|
||||||
"aboutDataUsageData",
|
|
||||||
"aboutDataUsageCache",
|
|
||||||
"aboutDataUsageDatabase",
|
|
||||||
"aboutDataUsageMisc",
|
|
||||||
"aboutDataUsageInternal",
|
|
||||||
"aboutDataUsageExternal",
|
|
||||||
"aboutDataUsageClearCache",
|
|
||||||
"drawerPlacePage",
|
|
||||||
"statePageTitle",
|
|
||||||
"stateEmpty",
|
|
||||||
"placePageTitle",
|
|
||||||
"placeEmpty",
|
|
||||||
"searchStatesSectionTitle",
|
|
||||||
"settingsAskEverytime",
|
|
||||||
"settingsModificationWarningDialogMessage",
|
|
||||||
"settingsConfirmationVaultDataLoss",
|
|
||||||
"settingsCollectionBurstPatternsTile",
|
|
||||||
"settingsCollectionBurstPatternsNone",
|
|
||||||
"settingsViewerShowHistogram",
|
|
||||||
"settingsViewerShowDescription",
|
|
||||||
"settingsVideoPlaybackTile",
|
|
||||||
"settingsVideoPlaybackPageTitle",
|
|
||||||
"settingsVideoResumptionModeTile",
|
|
||||||
"settingsVideoResumptionModeDialogTitle",
|
|
||||||
"settingsVideoBackgroundMode",
|
|
||||||
"settingsVideoBackgroundModeDialogTitle",
|
|
||||||
"settingsVideoGestureVerticalDragBrightnessVolume",
|
|
||||||
"settingsDisablingBinWarningDialogMessage",
|
|
||||||
"settingsAccessibilityShowPinchGestureAlternatives",
|
|
||||||
"statsTopStatesSectionTitle",
|
|
||||||
"tagPlaceholderState"
|
|
||||||
],
|
|
||||||
|
|
||||||
"zh_Hant": [
|
"zh_Hant": [
|
||||||
"entryActionCast",
|
"entryActionCast",
|
||||||
"overlayHistogramNone",
|
"overlayHistogramNone",
|
||||||
|
|
Loading…
Reference in a new issue