Skip to content

Commit

Permalink
fix(style): add constrains to panel content
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Oct 1, 2024
1 parent 05a6da7 commit ae7bafb
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 10 deletions.
8 changes: 4 additions & 4 deletions assets/svg/unstake-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions lib/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"available": "Available",
"backLabel": "Back",
"balance": "balance",
"balanceDetails": "Balance details",
"biometricsLabel": "Biometrics",
"blocksMined": "Blocks mined",
"buildWallet01": "The different addresses in your wallet are being scanned for existing transactions and balance. This will normally take less than 1 minute.",
Expand Down
1 change: 1 addition & 0 deletions lib/l10n/app_es.arb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"available": "Disponible",
"backLabel": "Volver",
"balance": "saldo",
"balanceDetails": "Saldo en detalle",
"biometricsLabel": "Biométricas",
"blocksMined": "Bloques extraídos",
"buildWallet01": "Se están escaneando las diferentes direcciones de tu cartera en busca de transacciones y saldo existentes. Esto normalmente tomará menos de 1 minuto.",
Expand Down
4 changes: 2 additions & 2 deletions lib/theme/colors.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ class WitnetPallet {

static const darkRed = Color.fromARGB(255, 211, 53, 64);
static const darkOrange = Color.fromARGB(255, 202, 119, 1);
static const brightRed = Color(0xFFed0b00);
static const brightRed = Color.fromARGB(255, 236, 56, 56);
static const brightOrange = Color(0xFFed9900);
static const darkGreen = Color.fromARGB(255, 25, 147, 66);
static const brightGreen = Color(0xFF00ed99);
static const brightGreen = Color.fromARGB(212, 67, 252, 187);
static const brown = Color.fromARGB(255, 147, 82, 1);
}

Expand Down
2 changes: 2 additions & 0 deletions lib/theme/dark_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ InputDecorationTheme inputDecorationTheme = InputDecorationTheme(
labelStyle: TextStyle(color: WitnetPallet.opacityWhite),
hoverColor: const Color.fromARGB(9, 255, 255, 255),
focusColor: WitnetPallet.brightCyanOpacity1,
isDense: true,
isCollapsed: false,
contentPadding: EdgeInsets.all(16),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
Expand Down
7 changes: 6 additions & 1 deletion lib/widgets/balance_details.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,16 @@ class BalanceDetails extends StatelessWidget {
final labelTextStyle = extendedTheme.mediumPanelText;
;
return Padding(
padding: EdgeInsets.all(16),
padding: EdgeInsets.only(top: 32, bottom: 32, left: 24, right: 24),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
localization.balanceDetails,
style: labelTextStyle,
),
SizedBox(height: 24),
Row(children: [
Text(
localization.available,
Expand Down
9 changes: 7 additions & 2 deletions lib/widgets/layouts/layout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,15 @@ class LayoutState extends State<Layout> with TickerProviderStateMixin {
backdropEnabled: true,
color: extendedTheme.panelBgColor!,
minHeight: 0,
maxHeight: MediaQuery.of(context).size.height * 0.3,
maxHeight: MediaQuery.of(context).size.height * 0.4,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(8), topRight: Radius.circular(8)),
panel: widget.slidingPanel,
panel: Center(
child: ConstrainedBox(
constraints: BoxConstraints(
maxWidth: 600,
),
child: widget.slidingPanel)),
onPanelClosed: () => {
Timer(Duration(milliseconds: 300),
() => setState(() => PanelUtils().setCloseState()))
Expand Down
4 changes: 3 additions & 1 deletion lib/widgets/snack_bars.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ SnackBar buildErrorSnackbar(
final extendedTheme = theme.extension<ExtendedTheme>()!;
return SnackBar(
clipBehavior: Clip.none,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(24))),
action: action != null
? SnackBarAction(
label: 'Dismiss',
Expand All @@ -86,7 +88,7 @@ SnackBar buildErrorSnackbar(
borderRadius: BorderRadius.circular(24),
color: WitnetPallet.lightGrey,
),
padding: EdgeInsets.only(left: 8),
padding: EdgeInsets.only(left: 8, right: 8, top: 4, bottom: 4),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expand Down

0 comments on commit ae7bafb

Please sign in to comment.