[pve-devel] [PATCH pve-flutter-frontend 5/9] fix clipping for data card widget

Dominik Csapak d.csapak at proxmox.com
Fri Apr 12 10:04:54 CEST 2024


since cards now have a very rounded corner, one can see the non clipped
shape of the contained ExpansionTile.

To fix that, make the shape a RoundedRectangleBorder (which also removes
the added top/bottom border on expansion) and set the clipBehavior of
the surrounding card to antiAlias.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 lib/widgets/pve_resource_data_card_widget.dart | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/widgets/pve_resource_data_card_widget.dart b/lib/widgets/pve_resource_data_card_widget.dart
index 38001a0..28e4460 100644
--- a/lib/widgets/pve_resource_data_card_widget.dart
+++ b/lib/widgets/pve_resource_data_card_widget.dart
@@ -33,10 +33,12 @@ class PveResourceDataCardWidget extends StatelessWidget {
         ),
         child: Card(
           color: Theme.of(context).colorScheme.surface,
+          clipBehavior: Clip.antiAlias,
           child: Builder(
             builder: (context) {
               if (expandable) {
                 return ExpansionTile(
+                  shape: const RoundedRectangleBorder(),
                   textColor: theme.colorScheme.onSurface,
                   title: Row(
                     mainAxisAlignment: MainAxisAlignment.spaceBetween,
-- 
2.39.2





More information about the pve-devel mailing list