@@ -20,7 +20,8 @@ import Hatter
2020 , runActionM
2121 )
2222import Hatter.Widget
23- ( ButtonConfig (.. )
23+ ( defaultStyle
24+ , ButtonConfig (.. )
2425 , InputType (.. )
2526 , LayoutSettings (.. )
2627 , TextConfig (.. )
@@ -294,7 +295,7 @@ incrementalRenderTests = testGroup "Incremental rendering"
294295
295296 , testCase " styled unchanged keeps same node ID" $ do
296297 (() , rs) <- withActions (pure () )
297- let style = WidgetStyle ( Just 10.0 ) Nothing Nothing Nothing Nothing Nothing
298+ let style = defaultStyle { wsPadding = Just 10.0 }
298299 widget = Styled style (Text TextConfig { tcLabel = " styled" , tcFontConfig = Nothing , tcTextColor = Nothing })
299300 renderWidget rs widget
300301 tree1 <- readIORef (rsRenderedTree rs)
@@ -310,7 +311,7 @@ incrementalRenderTests = testGroup "Incremental rendering"
310311
311312 , testCase " styled child change updates in-place" $ do
312313 (() , rs) <- withActions (pure () )
313- let style = WidgetStyle ( Just 10.0 ) Nothing Nothing Nothing Nothing Nothing
314+ let style = defaultStyle { wsPadding = Just 10.0 }
314315 widget1 = Styled style (Text TextConfig { tcLabel = " before" , tcFontConfig = Nothing , tcTextColor = Nothing })
315316 renderWidget rs widget1
316317 tree1 <- readIORef (rsRenderedTree rs)
@@ -329,7 +330,7 @@ incrementalRenderTests = testGroup "Incremental rendering"
329330 , testCase " styled child type change reapplies style" $ do
330331 (clickAction, rs) <- withActions $
331332 createAction (pure () )
332- let style = WidgetStyle ( Just 10.0 ) Nothing Nothing Nothing Nothing Nothing
333+ let style = defaultStyle { wsPadding = Just 10.0 }
333334 widget1 = Styled style (Text TextConfig { tcLabel = " txt" , tcFontConfig = Nothing , tcTextColor = Nothing })
334335 renderWidget rs widget1
335336 -- Re-render with different child type but same style
0 commit comments