From 7b374b7e929c07d20220d9ab8e9ee09a12206442 Mon Sep 17 00:00:00 2001 From: mikecoomber <58986130+mikecoomber@users.noreply.github.com> Date: Wed, 20 Nov 2024 16:21:59 +0000 Subject: [PATCH] fix: Top app bar padding (#215) --- .../components/top_app_bar/top_app_bar.dart | 37 ++++++++++-------- .../golden/top_app_bar_centered.png | Bin 3318 -> 3294 bytes .../golden/top_app_bar_centered_actions.png | Bin 3368 -> 3343 bytes .../golden/top_app_bar_default.png | Bin 3320 -> 3296 bytes .../golden/top_app_bar_default_actions.png | Bin 3368 -> 3343 bytes .../top_app_bar/golden/top_app_bar_search.png | Bin 3320 -> 3295 bytes .../golden/top_app_bar_search_active.png | Bin 3512 -> 3483 bytes .../golden/top_app_bar_search_centered.png | Bin 3319 -> 3295 bytes 8 files changed, 20 insertions(+), 17 deletions(-) diff --git a/lib/src/components/top_app_bar/top_app_bar.dart b/lib/src/components/top_app_bar/top_app_bar.dart index 07030848..107caf1d 100644 --- a/lib/src/components/top_app_bar/top_app_bar.dart +++ b/lib/src/components/top_app_bar/top_app_bar.dart @@ -329,23 +329,26 @@ class _ZetaTopAppBarState extends State { return ZetaRoundedScope( rounded: context.rounded, - child: Padding( - padding: EdgeInsets.symmetric(horizontal: spacing.minimum), - child: AppBar( - elevation: 0, - scrolledUnderElevation: 0, - backgroundColor: colors.surfacePrimary, - iconTheme: IconThemeData(color: colors.iconDefault), - leading: leading, - toolbarHeight: spacing.xl_9, - automaticallyImplyLeading: widget.automaticallyImplyLeading, - surfaceTintColor: Colors.transparent, - centerTitle: widget.type == ZetaTopAppBarType.centered, - titleTextStyle: widget.titleTextStyle == null - ? ZetaTextStyles.bodyLarge.copyWith(color: colors.textDefault) - : widget.titleTextStyle!.copyWith(color: colors.textDefault), - title: title, - actions: actions, + child: ColoredBox( + color: colors.surfaceDefault, + child: Padding( + padding: EdgeInsets.symmetric(horizontal: spacing.minimum), + child: AppBar( + elevation: 0, + scrolledUnderElevation: 0, + backgroundColor: colors.surfacePrimary, + iconTheme: IconThemeData(color: colors.iconDefault), + leading: leading, + toolbarHeight: spacing.xl_9, + automaticallyImplyLeading: widget.automaticallyImplyLeading, + surfaceTintColor: Colors.transparent, + centerTitle: widget.type == ZetaTopAppBarType.centered, + titleTextStyle: widget.titleTextStyle == null + ? ZetaTextStyles.bodyLarge.copyWith(color: colors.textDefault) + : widget.titleTextStyle!.copyWith(color: colors.textDefault), + title: title, + actions: actions, + ), ), ), ); diff --git a/test/src/components/top_app_bar/golden/top_app_bar_centered.png b/test/src/components/top_app_bar/golden/top_app_bar_centered.png index ce49f58563ba5a831032df874441bb0e9c561617..c25bab98ecc3cd81d7305ade8e4863d9f5787032 100644 GIT binary patch literal 3294 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i1B%QlYbpRzjKx9jP7LeL$-D$|Sc;uI zLpXq-h9jkefq|#P)5S5QV$R!}8wC$J2(UQ12(}lTuvfCwn0Q#Vsq*n|<%sgE{+Tn` z85kTM?5qMBuz{bEiGd-7g@b`%f}jFW*sTF5DoHcJxYg_oZ=TiEhxtD^|95YgKf{eK zb`}PP6C45z3<}B)3=9oD42%p6Mod%{JY#6Qxe93F26ldWd6aG;I%*LelI>_9j|MVL w%f-PBBMEOG{=qRI2z@+y01C>D>oRXg1Q(Cp00i_>zopr0I%ea`Tzg` literal 3318 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i1B%QlYbpRzjKx9jP7LeL$-D$|Sc;uI zLpXq-h9jkefq`d%r;B4q#hkY{4fC7~MO+;_9_3DG`@6nFEwU}v;rGjn8>iS`whiBI z`>FKY&pk3dhI&9V=5M%GwR`_IT}B25KlcWpfFvUm149Z62Lr{CZ^id*8=LpvKmLxBVfiC=76yhB90Cjs3d#-)3=KUDKzA82QC08^(DycWJ%-=b z0?qz6b?dd;Z|PtwEqpR+CUsNBXn2l>Cryi<(F8V{z(x}ojq3H$%r%<1Ml;u7&RqI8 YoJG68O?jIO>}D`{y85}Sb4q9e0BEq&TL1t6 diff --git a/test/src/components/top_app_bar/golden/top_app_bar_centered_actions.png b/test/src/components/top_app_bar/golden/top_app_bar_centered_actions.png index 2e6ac8905707721ac0468b183533928959430eaf..720ceb82e5e81c971a3c8a66ee48d768343b7df8 100644 GIT binary patch delta 243 zcmZ1>)h{){(Q>D!i(^Q|oVT|&@*Xk}a0qOg!7TM{eutV)Qj|+$%aj_Or+XRo)+yD` zoo;x{f{}rN<=lTe1_p)#nTZ!gC+^XjxJTZy_-65suVwdB&K1|@7_l=j^ram8y@Qv7 zfnkE60t16X+I97a_jR$ibGGU+&FKAqJI3ZSYhThdppwZK87;hLdVgK``fXe-7X!l& zgVVKl*jN}CPH+e?Feq$(ExhLWuN%cS3=AKR_Ixjt1_>%VFfcUqFaTX*!~{~Qlic(1 ry))27#}k-0KV&rIo_v7OL~N#bte4{YWBM~vfieu9u6{1-oD!M<{jObR delta 266 zcmeB|S|K&T(e09_i(^Q|oVT|O^A0(PI5>9P$aXmV*WZQt_y+DvvqUB;-Q?FkQ&P6^ z^{HFS_aD!kHLtzZ@E9WlLjvz-oBcNRd*6C9Ff{Z}T&D#_+*ZqV#qHzQtzPqa$NjKK zb_NE!lXB-Dt0^!rIJh-1Ffh#YU7w))w=`$-wH+J@`G4+zJ8ByLAo$Hwn>?n;flL-5 z&q8ub_QkAT3p7;zTalbOBhV@%CKd*U6FF6^uM79*?zCZG_|R=T@3^l6P)!d5T%JRK zfkB~o&a#&~YYdN7+`kUA?Efj7^ZMu2HXAaX;F>JJG*9d&n}eeIM6SiZK(Y*;u6{1- HoD!MX^K{bj=L_t(|obB1M4Z=_m1wq@Q4oK*~A`)oi$Y=m-f8dz{PA^^E zJ~Oic000Dz)dK(kfa?&Gu>oxq=63eM`{Q}`N&fJ8zgABG0DvDKk)KnMo)8NA%*^T$ o006)>__Lt_K?{?R0VNjZ3vOHwsepI)?EnA(07*qoM6N<$f>DMzi~s-t delta 164 zcmaDL`9pGoqw^w97srr_Id5-n%w;wdU~t^4xGhor-F_w2BFU5w=U6nqCCg7p-;`Xi zqvT-jxt;OzdJOd#7#Q3mviF{mUmnZE!0^X#TpX zFfdenV4m2RB$76}_}zK_gTe~DWM4fV9i6j diff --git a/test/src/components/top_app_bar/golden/top_app_bar_default_actions.png b/test/src/components/top_app_bar/golden/top_app_bar_default_actions.png index 725391c67186a18f8874677ea7a215d9400ffff5..482097c63727e3936a77560d0dffd82817d6e434 100644 GIT binary patch delta 227 zcmV<90383Q8jl)~K{&ZdL_t(|obB4N4FWL`06{=s2PE`g5eYP6Qbd42`d=*lOaW(y zUY(C)jBx+}00^A^eE|RfU_X(eM3K-Hke_ zkK2F%000>Q0ssJHHvNM2xZk!M4*&psFynjN29x0d6b#2P#`yOo004k}umQ920U-;M dzyU-S%o8>ZA+PIR9|Zsa002ovPDHLkV1gsyScw1t delta 274 zcmeB|S|K&T(e09_i(^Q|oVT|O^A0(PI5>8EFkSHQpZcQ4om6LF}Jnl+MPds7R9E_ zJ^pvw2`dJM4eHT*`e!!)HAyluF)*Zr)i#-azrOKo(Bnl*bHBz^KdqEwIPgB_sa+n^ zWJN{|pcw)o&q8ub_QkAT%fQfJ9=#Jy_tzcwuf@nQF#I?u_WrS&0t17C8^UxJ4hDt^ zmVJ+Z%=s_T_ON(4BLl;~shP9l_W5pBWV*pMS%9fe>@%;#6ZMI`kshHyM=^N1`njxg HN@xNAe#>j% diff --git a/test/src/components/top_app_bar/golden/top_app_bar_search.png b/test/src/components/top_app_bar/golden/top_app_bar_search.png index 00604a3329e24a8be851d99fc2a14ac196194b0c..d4dc30acab12bc932ae64b9fc32d1fa18bfdde4f 100644 GIT binary patch literal 3295 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i1B%QlYbpRzjKx9jP7LeL$-D$|Sc;uI zLpXq-h9jkefq|#f)5S5QV$R!}8+i`}2(UW#tT?RlC0>xzq{t-kt@$S(#^ux3<;|YC zlM$%(-D-BA3D*@J7#JFQ7=R*1Oe_oxCpZKc7!;IgC3xoXi{{^-OTT#fJ^5X^ejWqE z0r}62w6}Zn*)wb8fY!t`^K&pTOb}FHU~q72U|?X7WMpDsNMRWj91W1s#4wr>MoWg# sQgO6K7_ALQYs1mnaI`k0pf;?VGnaqmU$=-kz&196r>mdKI;Vst0P)C``~Uy| literal 3320 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i1B%QlYbpRzjKx9jP7LeL$-D$|Sc;uI zLpXq-h9jkefq`d{r;B4q#hkY{cjq!23OG1=8r+^B^fi8>@NOQX372;N`EYLj%p6G_ zv)Tux=YHc-WDoSE> zSs55&g4ZPgHA{wX0J=>q`b_%aB)i*R%>G4YH_VwocU^H6P`Is-m0KHV_M4u^7I{^| z+izYy{N1k^=vht<1_l8kkni0Z7=VVH2b1cX6PX;jCof=D5c|gz@!0mxr+rHn1Em=} MUHx3vIVCg!0F$1ww*UYD delta 437 zcmV;m0ZRUx8@L;gL26=2L_t(|obBDAZc|YJfZ;nrB_YemGC?*HCQt}6IWdbz5uO0a zgCKbV9t43T2oz!@Y(bC(vJhM=h8o%2xM}~6_4{0#o^x;O{+@Gk*QV3y*>J&RG8q5> z0Onyfn_YT+YiV}^0068UlfeRBf4RNL$+vfQ=Q7Xn(cxU?S%&l9;D7!O001yARzLs% zfXqTyKmY)M<$Cx2!|?Ib=TT#yJbpAB?C;I>ezE}h*DXl%+P(z<09+qdKq9Z-yd5=e zYjb1xe)4nlbss*sKYaQ6ZS?rfd+Wo=kJF`HfBo*A;q=$<(c`x^H-_iW8=j6H4*aYoP&hd~~?T=>Y(M|BNkI002N{Z91KvU3_CQnJn*a zZlLqS_f~@d09Zw{+3eD5DKt_N7000>Q0ssJHoB;s<02am>5C8yRX#@xWv$O)y f3X|{xh!*A#(fCHMr;5y^00000NkvXXu0mjf=5xa| diff --git a/test/src/components/top_app_bar/golden/top_app_bar_search_centered.png b/test/src/components/top_app_bar/golden/top_app_bar_search_centered.png index e65986b06df85d9e2a14d90ddda07960616ef33a..f6c930a0190ee20c1f9e4569c6b1f2524bacbc95 100644 GIT binary patch literal 3295 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYV2a>i1B%QlYbpRzjKx9jP7LeL$-D$|Sc;uI zLpXq-h9jkefq|#f)5S5QV$R!}8+i`}h_E>JtT?RlC4QptofC_>zIlK1VV%A%Z}!Ye zkj{Cl*@4t|MF$3kh8_k+1_mQ076yhB90Cjs3d*z+Jd^#Ep<(rn`}3~~|5*IFdd)nB z0!}%a+6eL5?K5Xy2{JGou&tn#&*&C}qZZL2osI_bXdu&}SQ-uF(LknW^*dUujpn$~ i95i1B%QlYbpRzjKx9jP7LeL$-D$|Sc;uI zLpXq-h9jkefq`eCr;B4q#hkY{Hx@b>inux^tTFR>^iNyKFx7+6Ptn}nc>ditn!8>~ z&V4?o|MFzRW1I{O5A4@$jeB=`n<@jtf#ZTe>m1w~fF?^aGBGfuuy8OiOrV+Iv+VB- z4U2#5`}bzv0qMK-`McE_WSZm!7#I|k9T*rIdKefP7>t-$7#L1)P*?D|<@3is6MHu1 z^D;0LXk@RQew&}B9;I7|j#@;AWIGzjqk%kHT+p+k7|n5`Ic_w^jpjJ|G)qTI8=93i b{}}2fi*`RL+OY}P#bEGs^>bP0l+XkKty7{Y