mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-08 18:28:53 +01:00
Tweak button style in viewer detail pane
This commit is contained in:
parent
4fc6b17de1
commit
b91a8f9e06
1 changed files with 29 additions and 21 deletions
|
@ -162,9 +162,11 @@ class _ViewerDetailPaneState extends State<ViewerDetailPane> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (_file != null) ...[
|
if (_file != null) ...[
|
||||||
|
const SizedBox(height: 8),
|
||||||
SingleChildScrollView(
|
SingleChildScrollView(
|
||||||
scrollDirection: Axis.horizontal,
|
scrollDirection: Axis.horizontal,
|
||||||
child: Row(
|
child: Row(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
if (_canRemoveFromAlbum)
|
if (_canRemoveFromAlbum)
|
||||||
_DetailPaneButton(
|
_DetailPaneButton(
|
||||||
|
@ -535,28 +537,34 @@ class _DetailPaneButton extends StatelessWidget {
|
||||||
});
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return TextButton(
|
return ClipRRect(
|
||||||
onPressed: onPressed,
|
borderRadius: BorderRadius.circular(80),
|
||||||
style: ButtonStyle(
|
child: Material(
|
||||||
foregroundColor:
|
type: MaterialType.transparency,
|
||||||
MaterialStateProperty.all(Theme.of(context).colorScheme.onSurface),
|
child: InkWell(
|
||||||
),
|
onTap: onPressed,
|
||||||
child: SizedBox(
|
child: Padding(
|
||||||
width: 96,
|
padding: const EdgeInsets.all(12),
|
||||||
height: 96,
|
child: Container(
|
||||||
child: Padding(
|
constraints: const BoxConstraints(
|
||||||
padding: const EdgeInsets.fromLTRB(8, 16, 8, 0),
|
maxWidth: 72,
|
||||||
child: Column(
|
minWidth: 72,
|
||||||
children: [
|
minHeight: 72,
|
||||||
Icon(icon),
|
|
||||||
const SizedBox(height: 4),
|
|
||||||
Text(
|
|
||||||
label,
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
style: Theme.of(context).textTheme.labelMedium,
|
|
||||||
),
|
),
|
||||||
],
|
alignment: Alignment.topCenter,
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Icon(icon),
|
||||||
|
const SizedBox(height: 4),
|
||||||
|
Text(
|
||||||
|
label,
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: Theme.of(context).textTheme.labelMedium,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Reference in a new issue