Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Background colour for HBox #45

Closed
leaanthony opened this issue Jul 24, 2017 · 4 comments
Closed

Background colour for HBox #45

leaanthony opened this issue Jul 24, 2017 · 4 comments

Comments

@leaanthony
Copy link

Is there a way I can set a BG colour for an HBox? I'm making a custom status bar using HBox and spacers and whilst it looks good so far, having a background colour would be awesome!

@marcusolsson
Copy link
Owner

I think this is probably what I would expect to get from setting theme.SetStyle("box", tui.Style{Fg: tui.ColorBlue, Bg: tui.ColorRed). This should be a fairly straightforward fix.

Huge thanks for letting me know what you'd like to see in tui-go!

@leaanthony
Copy link
Author

leaanthony commented Jul 24, 2017 via email

@leaanthony
Copy link
Author

I made a fix for this in my local branch, but after looking at the code, wouldn't it be better to have a custom style defined in WidgetBase that each component uses as an override for default styles?

@marcusolsson
Copy link
Owner

marcusolsson commented Jul 25, 2017

Thanks! Also, super cool that you're interested in contributing to tui-go!

Yes, I think you're right about allowing custom styles for all widgets. Right now, the only widget that supports custom styling is the Label widget, using the SetStyleName method. I can totally see us moving it up into the WidgetBase.

Edit: I created #46 in case we want to continue this discussion.

cceckman added a commit to cceckman/tui-go that referenced this issue Dec 18, 2017
Update tests to reflect this. Add tests for Box styling that test this,
and partial style application within a Box.

I think this (and preceding commits) fix marcusolsson#45.
cceckman added a commit to cceckman/tui-go that referenced this issue Dec 21, 2017
Update tests to reflect this. Add tests for Box styling that test this,
and partial style application within a Box.

I think this (and preceding commits) fix marcusolsson#45.
cceckman added a commit to cceckman/tui-go that referenced this issue Dec 21, 2017
Update tests to reflect this. Add tests for Box styling that test this,
and partial style application within a Box.

I think this (and preceding commits) fix marcusolsson#45.
cceckman added a commit to cceckman/tui-go that referenced this issue Dec 24, 2017
Update tests to reflect this. Add tests for Box styling that test this,
and partial style application within a Box.

I think this (and preceding commits) fix marcusolsson#45.
cceckman added a commit to cceckman/tui-go that referenced this issue Dec 24, 2017
Update tests to reflect this. Add tests for Box styling that test this,
and partial style application within a Box.

I think this (and preceding commits) fix marcusolsson#45.
cceckman added a commit to cceckman/tui-go that referenced this issue Dec 24, 2017
Update tests to reflect this. Add tests for Box styling that test this,
and partial style application within a Box.

I think this (and preceding commits) fix marcusolsson#45.
marcusolsson pushed a commit that referenced this issue Dec 29, 2017
Update tests to reflect this. Add tests for Box styling that test this,
and partial style application within a Box.

I think this (and preceding commits) fix #45.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants