mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-06-25 09:04: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,
|
primaryMiddle,
|
||||||
primaryDense,
|
primaryDense,
|
||||||
secondaryDense,
|
secondaryDense,
|
||||||
|
secondaryMiddle,
|
||||||
error,
|
error,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -212,6 +213,25 @@ class _MyButtonState extends State<MyButton>
|
||||||
fontWeight: FontWeight.bold,
|
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:
|
case MyButtonVariant.error:
|
||||||
buttonStyle = FilledButton.styleFrom(
|
buttonStyle = FilledButton.styleFrom(
|
||||||
backgroundColor: Theme.of(context).colorScheme.errorContainer,
|
backgroundColor: Theme.of(context).colorScheme.errorContainer,
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ class SaveToGalleryButtonState extends State<SaveToGalleryButton> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final isEnabled = !widget.isLoading && !_imageSaving;
|
final isEnabled = !widget.isLoading && !_imageSaving;
|
||||||
return MyButton(
|
return MyButton(
|
||||||
variant: MyButtonVariant.secondaryDense,
|
variant: MyButtonVariant.secondaryMiddle,
|
||||||
onPressed: isEnabled
|
onPressed: isEnabled
|
||||||
? () async {
|
? () async {
|
||||||
setState(() {
|
setState(() {
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,8 @@ class _ShareImageEditorView extends State<ShareImageEditorView> {
|
||||||
layers.add(FilterLayerData(key: GlobalKey()));
|
layers.add(FilterLayerData(key: GlobalKey()));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (widget.previewLink != null && widget.previewLink!.shouldGeneratePreview) {
|
if (widget.previewLink != null &&
|
||||||
|
widget.previewLink!.shouldGeneratePreview) {
|
||||||
layers.add(
|
layers.add(
|
||||||
LinkPreviewLayerData(key: GlobalKey(), link: widget.previewLink!.url),
|
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) const SizedBox(width: 10),
|
||||||
if (widget.sendToGroup != null)
|
if (widget.sendToGroup != null)
|
||||||
MyButton(
|
MyButton(
|
||||||
variant: MyButtonVariant.secondaryDense,
|
variant: MyButtonVariant.secondaryMiddle,
|
||||||
onPressed: pushShareImageView,
|
onPressed: pushShareImageView,
|
||||||
child: const FaIcon(
|
child: const FaIcon(
|
||||||
FontAwesomeIcons.userPlus,
|
FontAwesomeIcons.userPlus,
|
||||||
|
|
|
||||||
|
|
@ -691,7 +691,6 @@ class _MediaViewerViewState extends State<MediaViewerView> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
backgroundColor: Colors.transparent,
|
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: Stack(
|
child: Stack(
|
||||||
fit: StackFit.expand,
|
fit: StackFit.expand,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue