-
Notifications
You must be signed in to change notification settings - Fork 14
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
[Question] How to change the background color? #13
Comments
It's currently not possible in this version. I will implement this feature. Thanks for pointing me to that. |
I have published a preview version via nuget (0.1.8-preview1): I introduced new Color Style for changing the Color Schemes of "Terminal.Gui": example: // normal scheme colors
Colors (Terminal.Gui.Color.White, Terminal.Gui.Color.Gray)
// scheme for focues elements
FocusColors (Terminal.Gui.Color.Red, Terminal.Gui.Color.DarkGray)
// scheme for normal elements with hotkey
HotNormalColors (Terminal.Gui.Color.Blue, Terminal.Gui.Color.Green)
// scheme for focued elements with hotkey
HotFocusedColors (Terminal.Gui.Color.BrightMagenta, Terminal.Gui.Color.BrightGreen)
// scheme for disabled elements
DisabledColors (Terminal.Gui.Color.Brown, Terminal.Gui.Color.White)
also I introduced 3 additional elements page -> styledPage
menuBar -> styledMenuBar
statusBar -> styledStatusBar All of them can be filled with the upper color styles, like you do in all other elements. in your case it also possible to use "stylePage": but window should also be possible: stylePage [
Styles [
Colors (Terminal.Gui.Color.White, Terminal.Gui.Color.Gray)
FocusColors (Terminal.Gui.Color.Red, Terminal.Gui.Color.DarkGray)
HotNormalColors (Terminal.Gui.Color.Blue, Terminal.Gui.Color.Green)
HotFocusedColors (Terminal.Gui.Color.BrightMagenta, Terminal.Gui.Color.BrightGreen)
DisabledColors (Terminal.Gui.Color.Brown, Terminal.Gui.Color.White)
]
] [
window [
Styles [
Colors (Terminal.Gui.Color.White, Terminal.Gui.Color.Gray)
]
] [ // ...
]
]
I didn't experiment, what combination fo the color had a specific outcome. Would be nice, if you experiment for your self and share what you find out :) - so I can make changes if needed, before I will publish this to all. |
Wow, thanks for the really quick response and fix! Using I am curious though what adding |
It can be, that the styles of the page (TopLevel in terms of the Terminal.Gui from Miguel) override the styles of the window. It should work on the window, when you don't use styles on the page. I didn't test all of that. Maybe you can run further research :D |
Yup, that was it; the page's styles do in fact override the styles of the window. Thanks again! So, should I close this issue now, or would you rather it stay open? |
Nope. Leave it open as long the stylin Gia in preview. Yes documentation. I am very bad at documentation. There is a demo project, where I use all elements. But I will write a proper documentation in the future. Promise :) |
Okay, sounds good! Oh, one last question; is there a way to make the background color the same color as the terminal background? Or would that require truecolor support in |
I didn't know any way to do that. |
Hello! Firstly, I'd like to say thank you for creating and working on this library; it's really cool and quite useful!
As for my question, (and this might be in the examples, in which case I apologize) I'm not really sure how to change the background color from the default; I tried this but it didn't change anything:
I'd really like to just keep the background and foreground color the same as in the terminal, if that makes sense? Either that or change them from the default.
Thanks in advance!
The text was updated successfully, but these errors were encountered: