@@ -48,44 +48,6 @@ export class LiquidGlass extends LiquidGlassCommon {
4848 return false ;
4949 }
5050
51- public onMeasure ( widthMeasureSpec : number , heightMeasureSpec : number ) : void {
52- // When LiquidGlass is a child of FlexboxLayout (or any layout that passes a child
53- // measure spec already reduced by the child's padding), GridLayout.onMeasure would
54- // subtract our padding a second time. To prevent this double-deduction we temporarily
55- // zero the effective padding/border values before delegating to the GridLayout
56- // measurement, then restore them immediately after.
57- const pl = this . effectivePaddingLeft ;
58- const pr = this . effectivePaddingRight ;
59- const pt = this . effectivePaddingTop ;
60- const pb = this . effectivePaddingBottom ;
61- const bl = this . effectiveBorderLeftWidth ;
62- const br = this . effectiveBorderRightWidth ;
63- const bt = this . effectiveBorderTopWidth ;
64- const bb = this . effectiveBorderBottomWidth ;
65-
66- this . effectivePaddingLeft = 0 ;
67- this . effectivePaddingRight = 0 ;
68- this . effectivePaddingTop = 0 ;
69- this . effectivePaddingBottom = 0 ;
70- this . effectiveBorderLeftWidth = 0 ;
71- this . effectiveBorderRightWidth = 0 ;
72- this . effectiveBorderTopWidth = 0 ;
73- this . effectiveBorderBottomWidth = 0 ;
74-
75- try {
76- super . onMeasure ( widthMeasureSpec , heightMeasureSpec ) ;
77- } finally {
78- this . effectivePaddingLeft = pl ;
79- this . effectivePaddingRight = pr ;
80- this . effectivePaddingTop = pt ;
81- this . effectivePaddingBottom = pb ;
82- this . effectiveBorderLeftWidth = bl ;
83- this . effectiveBorderRightWidth = br ;
84- this . effectiveBorderTopWidth = bt ;
85- this . effectiveBorderBottomWidth = bb ;
86- }
87- }
88-
8951 public onLayout ( left : number , top : number , right : number , bottom : number ) : void {
9052 // GridLayout.onLayout computes column/row offsets relative to (left, top), then
9153 // adds its own padding on top. Since the FlexboxLayout (or parent) already placed
0 commit comments