💄 Updating compose toolbar styling
This commit is contained in:
@@ -72,8 +72,7 @@ class ComposeToolbar extends HookConsumerWidget {
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
useRootNavigator: true,
|
||||
builder:
|
||||
(context) => DraftManagerSheet(
|
||||
builder: (context) => DraftManagerSheet(
|
||||
onDraftSelected: (draftId) {
|
||||
final draft = ref.read(composeStorageProvider)[draftId];
|
||||
if (draft != null) {
|
||||
@@ -97,13 +96,14 @@ class ComposeToolbar extends HookConsumerWidget {
|
||||
final colorScheme = Theme.of(context).colorScheme;
|
||||
|
||||
if (isCompact) {
|
||||
return Container(
|
||||
color: Theme.of(context).colorScheme.surfaceContainerLow,
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
return Material(
|
||||
elevation: 8,
|
||||
color: Theme.of(context).colorScheme.surfaceContainerHigh,
|
||||
child: Center(
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 560),
|
||||
child: Row(
|
||||
child:
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
@@ -140,7 +140,9 @@ class ComposeToolbar extends HookConsumerWidget {
|
||||
style: ButtonStyle(
|
||||
backgroundColor: WidgetStatePropertyAll(
|
||||
state.pollId.value != null
|
||||
? colorScheme.primary.withOpacity(0.15)
|
||||
? colorScheme.primary.withOpacity(
|
||||
0.15,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
@@ -153,7 +155,9 @@ class ComposeToolbar extends HookConsumerWidget {
|
||||
builder: (context, _) {
|
||||
return IconButton(
|
||||
onPressed: pickFund,
|
||||
icon: const Icon(Symbols.account_balance_wallet),
|
||||
icon: const Icon(
|
||||
Symbols.account_balance_wallet,
|
||||
),
|
||||
tooltip: 'fund'.tr(),
|
||||
color: colorScheme.primary,
|
||||
visualDensity: const VisualDensity(
|
||||
@@ -163,7 +167,9 @@ class ComposeToolbar extends HookConsumerWidget {
|
||||
style: ButtonStyle(
|
||||
backgroundColor: WidgetStatePropertyAll(
|
||||
state.fundId.value != null
|
||||
? colorScheme.primary.withOpacity(0.15)
|
||||
? colorScheme.primary.withOpacity(
|
||||
0.15,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
@@ -186,7 +192,9 @@ class ComposeToolbar extends HookConsumerWidget {
|
||||
style: ButtonStyle(
|
||||
backgroundColor: WidgetStatePropertyAll(
|
||||
state.embedView.value != null
|
||||
? colorScheme.primary.withOpacity(0.15)
|
||||
? colorScheme.primary.withOpacity(
|
||||
0.15,
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
@@ -230,10 +238,11 @@ class ComposeToolbar extends HookConsumerWidget {
|
||||
),
|
||||
],
|
||||
).padding(
|
||||
horizontal: 8,
|
||||
horizontal: 16,
|
||||
top: 4,
|
||||
bottom:
|
||||
useSafeArea ? MediaQuery.of(context).padding.bottom + 4 : 4,
|
||||
bottom: useSafeArea
|
||||
? MediaQuery.of(context).padding.bottom + 4
|
||||
: 4,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -246,14 +255,18 @@ class ComposeToolbar extends HookConsumerWidget {
|
||||
child: Center(
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 560),
|
||||
child: Row(
|
||||
child:
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: Row(
|
||||
children: [
|
||||
UploadMenu(items: uploadMenuItems, isCompact: isCompact),
|
||||
UploadMenu(
|
||||
items: uploadMenuItems,
|
||||
isCompact: isCompact,
|
||||
),
|
||||
IconButton(
|
||||
onPressed: linkAttachment,
|
||||
icon: const Icon(Symbols.attach_file),
|
||||
@@ -285,7 +298,9 @@ class ComposeToolbar extends HookConsumerWidget {
|
||||
builder: (context, _) {
|
||||
return IconButton(
|
||||
onPressed: pickFund,
|
||||
icon: const Icon(Symbols.account_balance_wallet),
|
||||
icon: const Icon(
|
||||
Symbols.account_balance_wallet,
|
||||
),
|
||||
tooltip: 'fund'.tr(),
|
||||
color: colorScheme.primary,
|
||||
style: ButtonStyle(
|
||||
|
||||
Reference in New Issue
Block a user