diff --git a/lib/screens/medicine_cabinet_screen.dart b/lib/screens/medicine_cabinet_screen.dart index ddb3765..f5f2fbc 100644 --- a/lib/screens/medicine_cabinet_screen.dart +++ b/lib/screens/medicine_cabinet_screen.dart @@ -333,25 +333,39 @@ class _MedicineCabinetScreenState extends State { ), onChanged: (val) => setState(() => _searchQuery = val.trim()), ), - const SizedBox(height: 8), + const SizedBox(height: 10), SingleChildScrollView( scrollDirection: Axis.horizontal, + physics: const BouncingScrollPhysics(), child: Row( children: _filters.map((f) { final selected = _selectedFilter == f; return Padding( padding: const EdgeInsets.only(right: 8), - child: ChoiceChip( - label: Text(f), - selected: selected, - selectedColor: const Color(0xFF2563EB), - labelStyle: TextStyle( - color: selected ? Colors.white : Colors.black87, - fontSize: 12, + child: InkWell( + onTap: () => setState(() => _selectedFilter = f), + borderRadius: BorderRadius.circular(20), + child: AnimatedContainer( + duration: const Duration(milliseconds: 150), + padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 8), + decoration: BoxDecoration( + color: selected ? const Color(0xFF2563EB) : const Color(0xFFF1F5F9), + borderRadius: BorderRadius.circular(20), + border: Border.all( + color: selected ? const Color(0xFF2563EB) : const Color(0xFFE2E8F0), + width: 1, + ), + ), + child: Text( + f, + style: TextStyle( + color: selected ? Colors.white : const Color(0xFF334155), + fontSize: 13, + fontWeight: selected ? FontWeight.bold : FontWeight.w500, + height: 1.2, + ), + ), ), - onSelected: (val) { - if (val) setState(() => _selectedFilter = f); - }, ), ); }).toList(), @@ -718,19 +732,24 @@ class _MedicineCabinetScreenState extends State { required Color color, }) { return Container( - padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 2), + padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4), decoration: BoxDecoration( color: color.withValues(alpha: 0.08), - borderRadius: BorderRadius.circular(4), + borderRadius: BorderRadius.circular(6), ), child: Row( mainAxisSize: MainAxisSize.min, children: [ - Icon(icon, size: 12, color: color), - const SizedBox(width: 3), + Icon(icon, size: 13, color: color), + const SizedBox(width: 4), Text( text, - style: TextStyle(color: color, fontSize: 11, fontWeight: FontWeight.w500), + style: TextStyle( + color: color, + fontSize: 11, + fontWeight: FontWeight.w500, + height: 1.2, + ), ), ], ), diff --git a/lib/screens/medicine_edit_dialog.dart b/lib/screens/medicine_edit_dialog.dart index e9ad9d2..4dfa419 100644 --- a/lib/screens/medicine_edit_dialog.dart +++ b/lib/screens/medicine_edit_dialog.dart @@ -263,6 +263,8 @@ class _MedicineEditDialogState extends State { children: MedicineCategory.values.map((cat) { final selected = _category == cat; return ChoiceChip( + showCheckmark: false, + labelPadding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2), label: Row( mainAxisSize: MainAxisSize.min, children: [ @@ -324,6 +326,8 @@ class _MedicineEditDialogState extends State { children: _commonLocations.map((loc) { final selected = _storageLocation == loc; return ChoiceChip( + showCheckmark: false, + labelPadding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2), label: Text(loc), selected: selected, selectedColor: const Color(0xFF059669), @@ -350,6 +354,8 @@ class _MedicineEditDialogState extends State { children: _commonUsers.map((user) { final selected = _targetUser == user; return ChoiceChip( + showCheckmark: false, + labelPadding: const EdgeInsets.symmetric(horizontal: 4, vertical: 2), label: Text(user), selected: selected, selectedColor: const Color(0xFFD97706),