mirror of
https://github.com/jtdaugherty/brick.git
synced 2024-11-25 10:52:15 +03:00
Whitespace
This commit is contained in:
parent
ade3f9d20e
commit
d636a3b081
@ -65,14 +65,14 @@ customProgressBar completeChar incompleteChar mLabel progress =
|
|||||||
leftWidth = spacesWidth `div` 2
|
leftWidth = spacesWidth `div` 2
|
||||||
rightWidth = barWidth - labelWidth - leftWidth
|
rightWidth = barWidth - labelWidth - leftWidth
|
||||||
completeWidth = round $ progress * toEnum barWidth
|
completeWidth = round $ progress * toEnum barWidth
|
||||||
|
|
||||||
leftCompleteWidth = min leftWidth completeWidth
|
leftCompleteWidth = min leftWidth completeWidth
|
||||||
leftIncompleteWidth = leftWidth - leftCompleteWidth
|
leftIncompleteWidth = leftWidth - leftCompleteWidth
|
||||||
leftPart = replicate leftCompleteWidth completeChar ++ replicate leftIncompleteWidth incompleteChar
|
leftPart = replicate leftCompleteWidth completeChar ++ replicate leftIncompleteWidth incompleteChar
|
||||||
rightCompleteWidth = max 0 (completeWidth - labelWidth - leftWidth)
|
rightCompleteWidth = max 0 (completeWidth - labelWidth - leftWidth)
|
||||||
rightIncompleteWidth = rightWidth - rightCompleteWidth
|
rightIncompleteWidth = rightWidth - rightCompleteWidth
|
||||||
rightPart = replicate rightCompleteWidth completeChar ++ replicate rightIncompleteWidth incompleteChar
|
rightPart = replicate rightCompleteWidth completeChar ++ replicate rightIncompleteWidth incompleteChar
|
||||||
|
|
||||||
fullBar = leftPart <> label <> rightPart
|
fullBar = leftPart <> label <> rightPart
|
||||||
adjustedCompleteWidth = if completeWidth == length fullBar && progress < 1.0
|
adjustedCompleteWidth = if completeWidth == length fullBar && progress < 1.0
|
||||||
then completeWidth - 1
|
then completeWidth - 1
|
||||||
|
Loading…
Reference in New Issue
Block a user