mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-10-09 02:54:14 +00:00
fix color and layout issue
This commit is contained in:
parent
3efaea3175
commit
078676c8b9
4 changed files with 29 additions and 27 deletions
|
|
@ -42,6 +42,7 @@ enum AppColor {
|
||||||
mediaForegroundMuted(light: Color(0xB3FFFFFF), dark: Color(0xB3FFFFFF)),
|
mediaForegroundMuted(light: Color(0xB3FFFFFF), dark: Color(0xB3FFFFFF)),
|
||||||
mediaBackground(light: Color(0xFF000000), dark: Color(0xFF000000)),
|
mediaBackground(light: Color(0xFF000000), dark: Color(0xFF000000)),
|
||||||
mediaScrim(light: Color(0x8A000000), dark: Color(0x8A000000)),
|
mediaScrim(light: Color(0x8A000000), dark: Color(0x8A000000)),
|
||||||
|
selectedZoom(light: Color(0xFFFFEB3B), dark: Color(0xFFFFEB3B)),
|
||||||
recording(light: Color(0xFFD32F2F), dark: Color(0xFFFF5252)),
|
recording(light: Color(0xFFD32F2F), dark: Color(0xFFFF5252)),
|
||||||
scanHighlight(light: Color(0xFF76FF03), dark: Color(0xFF76FF03)),
|
scanHighlight(light: Color(0xFF76FF03), dark: Color(0xFF76FF03)),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ class CameraZoomButtons extends StatelessWidget {
|
||||||
style: zoomButtonStyle.copyWith(
|
style: zoomButtonStyle.copyWith(
|
||||||
foregroundColor: WidgetStateProperty.all(
|
foregroundColor: WidgetStateProperty.all(
|
||||||
isSmallerFocused
|
isSmallerFocused
|
||||||
? context.appColor(AppColor.warning)
|
? context.appColor(AppColor.selectedZoom)
|
||||||
: context.appColor(AppColor.mediaForeground),
|
: context.appColor(AppColor.mediaForeground),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -125,7 +125,7 @@ class CameraZoomButtons extends StatelessWidget {
|
||||||
style: zoomButtonStyle.copyWith(
|
style: zoomButtonStyle.copyWith(
|
||||||
foregroundColor: WidgetStateProperty.all(
|
foregroundColor: WidgetStateProperty.all(
|
||||||
isMiddleFocused
|
isMiddleFocused
|
||||||
? context.appColor(AppColor.warning)
|
? context.appColor(AppColor.selectedZoom)
|
||||||
: context.appColor(AppColor.mediaForeground),
|
: context.appColor(AppColor.mediaForeground),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -148,7 +148,7 @@ class CameraZoomButtons extends StatelessWidget {
|
||||||
style: zoomButtonStyle.copyWith(
|
style: zoomButtonStyle.copyWith(
|
||||||
foregroundColor: WidgetStateProperty.all(
|
foregroundColor: WidgetStateProperty.all(
|
||||||
(scaleFactor >= 2)
|
(scaleFactor >= 2)
|
||||||
? context.appColor(AppColor.warning)
|
? context.appColor(AppColor.selectedZoom)
|
||||||
: context.appColor(AppColor.mediaForeground),
|
: context.appColor(AppColor.mediaForeground),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -105,30 +105,26 @@ class _PublicProfilePrivacyViewState extends State<PublicProfilePrivacyView> {
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(context.lang.customAvatarPhotoTab),
|
title: Text(context.lang.customAvatarPhotoTab),
|
||||||
subtitle: Text(context.lang.customAvatarExplanation),
|
subtitle: Text(context.lang.customAvatarExplanation),
|
||||||
trailing: SizedBox(
|
trailing: DropdownButtonHideUnderline(
|
||||||
width: 180,
|
child: DropdownButton<bool>(
|
||||||
child: DropdownButtonHideUnderline(
|
value: _customAvatar?.acceptedContactsOnly ?? true,
|
||||||
child: DropdownButton<bool>(
|
items: [
|
||||||
isExpanded: true,
|
DropdownMenuItem(
|
||||||
value: _customAvatar?.acceptedContactsOnly ?? true,
|
value: true,
|
||||||
items: [
|
child: Text(context.lang.customAvatarAcceptedOnly),
|
||||||
DropdownMenuItem(
|
),
|
||||||
value: true,
|
DropdownMenuItem(
|
||||||
child: Text(context.lang.customAvatarAcceptedOnly),
|
value: false,
|
||||||
),
|
child: Text(context.lang.privacyVisibilityEveryone),
|
||||||
DropdownMenuItem(
|
),
|
||||||
value: false,
|
],
|
||||||
child: Text(context.lang.privacyVisibilityEveryone),
|
onChanged: _customAvatar == null || _updatingAvatarVisibility
|
||||||
),
|
? null
|
||||||
],
|
: (acceptedOnly) {
|
||||||
onChanged: _customAvatar == null || _updatingAvatarVisibility
|
if (acceptedOnly != null) {
|
||||||
? null
|
_setCustomAvatarVisibility(acceptedOnly);
|
||||||
: (acceptedOnly) {
|
}
|
||||||
if (acceptedOnly != null) {
|
},
|
||||||
_setCustomAvatarVisibility(acceptedOnly);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -64,4 +64,9 @@ void main() {
|
||||||
expect(color.dark, expected);
|
expect(color.dark, expected);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('selected zoom uses yellow in both themes', () {
|
||||||
|
expect(AppColor.selectedZoom.light, const Color(0xFFFFEB3B));
|
||||||
|
expect(AppColor.selectedZoom.dark, const Color(0xFFFFEB3B));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue