Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] First line of text is centered when content align is non-centered #16

Closed
nedpals opened this issue Nov 9, 2020 · 1 comment · Fixed by Milerius/mm2-client#7
Closed
Labels
bug Something isn't working

Comments

@nedpals
Copy link

nedpals commented Nov 9, 2020

Describe the bug
When the ContentAlign is set to Left/Right and the TitlePos is not set to Inside, the first line of the content is still aligned to the center.
To Reproduce

package main

import "github.com/Delta456/box-cli-maker/v2"

func main() {
     bx := box.New(box.Config{
             Px: 2, 
             Py: 0, 
             Type: "Single", 
             ContentAlign: "Left", 
             Color: "Green", 
             TitlePos: "Top"
     })
     bx.Print("System Info", "Lorem Ipsum\nfoo bar hello world\n123456 abcdefghijk")
}

Expected behavior
The first line of the content should be aligned based on ContentAlign.

┌ System Info ───────────────────────────────────────────┐
│  OS:     linux ubuntu                                  │
│  Arch:   x86_64                                        │
│  CPU:    Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz x 8  │
│  RAM:    7.7 GiB                                       │
└────────────────────────────────────────────────────────┘

Screenshots / Logs

┌ System Info ───────────────────────────────────────────┐
│                  OS:     linux ubuntu                  │
│  Arch:   x86_64                                        │
│  CPU:    Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz x 8  │
│  RAM:    7.7 GiB                                       │
└────────────────────────────────────────────────────────┘

Versions (please complete the following information, if relevant):

  • Software version: 2.0.1
  • OS: Ubuntu 20.04
  • Golang version: `go version go1.15.2 linux/amd64
@nedpals nedpals added the bug Something isn't working label Nov 9, 2020
@Delta456
Copy link
Owner

Fixed 6b05cd8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants