-
Notifications
You must be signed in to change notification settings - Fork 702
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
Fixes #1800. TextView now uses the same colors as TextField. #1971
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comments.
What is the "right" way to get the old colors / Behavior? Old Behavior: Blue Background, Gray Text. In my case, I have a border/panel around the view, it looks much more natural to have the background blue. |
You can set the colors by creating a For example: using Terminal.Gui;
using Attribute = Terminal.Gui.Attribute;
Application.Init();
var win = new Window("Example App (Ctrl+Q to quit)");
ColorScheme myscheme = new ColorScheme
{
// Not Used (Normally Color when NOT tabbed into)
Normal = new Attribute(
Color.Red,Color.Black),
// Not Used (Normally Selected text or Shortcut key when NOT tabbed into
HotNormal = new Attribute(
Color.Black,Color.Red),
// Color of TextView when not readonly
Focus = new Attribute(
Color.Red,Color.Black),
// Not Used (Normally the Shortcut color color when tabbed into)
HotFocus = new Attribute(
Color.Black,Color.Red),
// When ReadOnly
Disabled = new Attribute(Color.Gray,Color.Black),
};
win.Add(
new TextView()
{
Width = Dim.Fill(),
Height = Dim.Fill() -1,
ColorScheme = myscheme,
AllowsTab = false,
}
);
win.Add(
new TextField()
{
Width = 10,
Y = Pos.AnchorEnd(1)
}
);
Application.Run(win);
Application.Shutdown(); UPDATE: Actually it looks like only |
Fixes #1800.
Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)