style: Update padding and text styles in LocationDisplay and CompassHeader for improved UI consistency

This commit is contained in:
Janez T
2025-10-15 10:44:46 +02:00
parent dbaf09e701
commit 3c3db22eb0
2 changed files with 69 additions and 67 deletions

View File

@@ -20,24 +20,25 @@ class LocationDisplay extends StatelessWidget {
return GestureDetector(
onTap: () => _showLocationFormats(context),
child: Container(
width: double.infinity,
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 8),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
borderRadius: BorderRadius.circular(6),
borderRadius: BorderRadius.circular(8),
),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(Icons.location_on, size: 16),
const Icon(Icons.location_on, size: 18),
const SizedBox(width: 6),
Text(
'${location.latitude.toStringAsFixed(5)}, ${location.longitude.toStringAsFixed(5)}',
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
style: Theme.of(context).textTheme.titleMedium?.copyWith(
fontFamily: 'monospace',
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
),
),
const SizedBox(width: 4),
const SizedBox(width: 6),
Icon(
Icons.open_in_new,
size: 14,
@@ -64,7 +65,8 @@ class LocationDisplay extends StatelessWidget {
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
),
builder: (context) => Container(
builder: (context) => SingleChildScrollView(
child: Container(
padding: const EdgeInsets.all(24),
child: Column(
mainAxisSize: MainAxisSize.min,
@@ -124,6 +126,7 @@ class LocationDisplay extends StatelessWidget {
],
),
),
),
);
}

View File

@@ -576,7 +576,7 @@ class _LocationFormatToggleState extends State<_LocationFormatToggle> {
},
behavior: HitTestBehavior.opaque,
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surfaceContainerHighest,
borderRadius: BorderRadius.circular(8),
@@ -585,10 +585,9 @@ class _LocationFormatToggleState extends State<_LocationFormatToggle> {
child: Text(
displayText,
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
fontWeight: FontWeight.w500,
style: Theme.of(context).textTheme.titleMedium?.copyWith(
fontWeight: FontWeight.w600,
fontFamily: 'monospace',
fontSize: 11,
),
),
),