Importált rétegek stílusának szerkesztése
This commit is contained in:
@@ -117,39 +117,42 @@ class _GeometryLayerTile extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final cs = Theme.of(context).colorScheme;
|
||||
|
||||
return ListTile(
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 0),
|
||||
leading: Container(
|
||||
width: 36,
|
||||
height: 36,
|
||||
decoration: BoxDecoration(
|
||||
color: (visible ? color : Colors.grey).withOpacity(0.12),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(
|
||||
color: (visible ? color : Colors.grey).withOpacity(0.3),
|
||||
return Material(
|
||||
color: Colors.transparent,
|
||||
child: ListTile(
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 20, vertical: 0),
|
||||
leading: Container(
|
||||
width: 36,
|
||||
height: 36,
|
||||
decoration: BoxDecoration(
|
||||
color: (visible ? color : Colors.grey).withOpacity(0.12),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(
|
||||
color: (visible ? color : Colors.grey).withOpacity(0.3),
|
||||
),
|
||||
),
|
||||
child: Icon(icon, size: 18, color: visible ? color : Colors.grey),
|
||||
),
|
||||
child: Icon(icon, size: 18, color: visible ? color : Colors.grey),
|
||||
title: Text(label,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
color: visible ? null : cs.onSurfaceVariant,
|
||||
)),
|
||||
subtitle: count > 0
|
||||
? Text('$count objektum', style: const TextStyle(fontSize: 11))
|
||||
: Text('Nincs rögzített geometria',
|
||||
style: TextStyle(fontSize: 11, color: cs.onSurfaceVariant)),
|
||||
trailing: Switch(
|
||||
value: visible,
|
||||
onChanged: (_) => onToggle(),
|
||||
activeColor: color,
|
||||
trackColor: WidgetStateProperty.resolveWith((states) =>
|
||||
states.contains(WidgetState.selected)
|
||||
? color.withOpacity(0.3)
|
||||
: null),
|
||||
),
|
||||
onTap: onToggle,
|
||||
),
|
||||
title: Text(label,
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.w500,
|
||||
color: visible ? null : cs.onSurfaceVariant,
|
||||
)),
|
||||
subtitle: count > 0
|
||||
? Text('$count objektum', style: const TextStyle(fontSize: 11))
|
||||
: Text('Nincs rögzített geometria',
|
||||
style: TextStyle(fontSize: 11, color: cs.onSurfaceVariant)),
|
||||
trailing: Switch(
|
||||
value: visible,
|
||||
onChanged: (_) => onToggle(),
|
||||
activeColor: color,
|
||||
trackColor: WidgetStateProperty.resolveWith((states) =>
|
||||
states.contains(WidgetState.selected)
|
||||
? color.withOpacity(0.3)
|
||||
: null),
|
||||
),
|
||||
onTap: onToggle,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user