mirror of
https://github.com/fjvallarino/monomer.git
synced 2024-09-21 00:38:01 +03:00
Fix state handling in label
This commit is contained in:
parent
a2acefcba0
commit
a6e3dd7e57
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user