mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-06-25 06:44:07 +00:00
fix smaller ui issues
This commit is contained in:
parent
9b82310d49
commit
4e2b90de33
4 changed files with 24 additions and 4 deletions
|
|
@ -10,6 +10,7 @@ enum MyButtonVariant {
|
|||
primaryMiddle,
|
||||
primaryDense,
|
||||
secondaryDense,
|
||||
secondaryMiddle,
|
||||
error,
|
||||
}
|
||||
|
||||
|
|
@ -212,6 +213,25 @@ class _MyButtonState extends State<MyButton>
|
|||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
);
|
||||
case MyButtonVariant.secondaryMiddle:
|
||||
buttonStyle = FilledButton.styleFrom(
|
||||
backgroundColor: isDark ? Colors.grey[800] : Colors.grey[200],
|
||||
foregroundColor: isDark ? Colors.white : Colors.black87,
|
||||
disabledBackgroundColor: disabledBgColor,
|
||||
disabledForegroundColor: disabledFgColor,
|
||||
minimumSize: const Size(0, 48),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 24,
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(14),
|
||||
),
|
||||
elevation: 0,
|
||||
textStyle: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
);
|
||||
case MyButtonVariant.error:
|
||||
buttonStyle = FilledButton.styleFrom(
|
||||
backgroundColor: Theme.of(context).colorScheme.errorContainer,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class SaveToGalleryButtonState extends State<SaveToGalleryButton> {
|
|||
Widget build(BuildContext context) {
|
||||
final isEnabled = !widget.isLoading && !_imageSaving;
|
||||
return MyButton(
|
||||
variant: MyButtonVariant.secondaryDense,
|
||||
variant: MyButtonVariant.secondaryMiddle,
|
||||
onPressed: isEnabled
|
||||
? () async {
|
||||
setState(() {
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
|
|||
layers.add(FilterLayerData(key: GlobalKey()));
|
||||
}
|
||||
|
||||
if (widget.previewLink != null && widget.previewLink!.shouldGeneratePreview) {
|
||||
if (widget.previewLink != null &&
|
||||
widget.previewLink!.shouldGeneratePreview) {
|
||||
layers.add(
|
||||
LinkPreviewLayerData(key: GlobalKey(), link: widget.previewLink!.url),
|
||||
);
|
||||
|
|
@ -724,7 +725,7 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
|
|||
if (widget.sendToGroup != null) const SizedBox(width: 10),
|
||||
if (widget.sendToGroup != null)
|
||||
MyButton(
|
||||
variant: MyButtonVariant.secondaryDense,
|
||||
variant: MyButtonVariant.secondaryMiddle,
|
||||
onPressed: pushShareImageView,
|
||||
child: const FaIcon(
|
||||
FontAwesomeIcons.userPlus,
|
||||
|
|
|
|||
|
|
@ -691,7 +691,6 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Colors.transparent,
|
||||
body: SafeArea(
|
||||
child: Stack(
|
||||
fit: StackFit.expand,
|
||||
|
|
|
|||
Loading…
Reference in a new issue