[client] Align node permissions to the right
The previous layout depended on txtWrap being greedy, but not taking up all available horizontal space. That behaviour is incorrect according to the definition of greedy widgets, which have to take up all available horizontal space. In brick 0.52, this behaviour has been partially fixed. The padRight function added in this commit emulates the correct txtWrap behaviour even for cases where txtWrap has not been fixed yet. If txtWrap is fixed entirely, the padRight can be removed again.
This commit is contained in:
parent
22974d96a7
commit
ab8c764329
1 changed files with 1 additions and 1 deletions
|
|
@ -268,7 +268,7 @@ renderNode focused node =
|
||||||
decorateFlags (nodeFlags node) $
|
decorateFlags (nodeFlags node) $
|
||||||
decorateFocus focused $
|
decorateFocus focused $
|
||||||
decorateExpand (not $ OMap.null $ nodeChildren node) $
|
decorateExpand (not $ OMap.null $ nodeChildren node) $
|
||||||
txtWrap $ nodeText node
|
padRight Max $ txtWrap $ nodeText node
|
||||||
|
|
||||||
nodeToTree :: (Ord n, Show n) => UiState n -> Path -> Node -> Maybe [WidgetTree n] -> WidgetTree n
|
nodeToTree :: (Ord n, Show n) => UiState n -> Path -> Node -> Maybe [WidgetTree n] -> WidgetTree n
|
||||||
nodeToTree s path node maybeChildren = case uiEditor s of
|
nodeToTree s path node maybeChildren = case uiEditor s of
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue