Fix state handling in label

This commit is contained in:
Francisco Vallarino 2020-11-06 22:14:42 -03:00
parent a2acefcba0
commit a6e3dd7e57

View File

@ -83,7 +83,6 @@ makeLabel :: LabelCfg -> LabelState -> Widget s e
makeLabel config state = widget where
widget = createSingle def {
singleGetBaseStyle = getBaseStyle,
singleMerge = merge,
singleGetSizeReq = getSizeReq,
singleResize = resize,
singleRender = render
@ -97,11 +96,6 @@ makeLabel config state = widget where
getBaseStyle wenv inst = Just style where
style = collectTheme wenv L.labelStyle
merge wenv oldState inst = resultWidget newInstance where
newInstance = inst {
_wiWidget = makeLabel config state
}
getSizeReq wenv inst = sizeReq where
style = activeStyle wenv inst
targetW = fmap getMinSizeReq (style ^. L.sizeReqW)