-
Notifications
You must be signed in to change notification settings - Fork 703
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
Wizards background shifts to gray when focusing, looks bad. #2571
Comments
That's strange, I'm just running UI catalog, haven't touched anything in the project either, happens with my own separate project where I get Terminal.GUI via nuget also. |
Maybe the nuget package isn't yet updated with the current develop branch. |
Nuget version reads 1.10.1, but I cloned the repo to run the UICatalog, so it shouldn't matter anyways. |
Here is a minimum repro Its probably not much consolation but this does seem to be fixed in using Terminal.Gui;
Application.Init();
var w = new Window();
var label = new Label("I'm outside wizard:");
var tf = new TextField("yay") { X = 20, Width = 20 };
w.Add(label);
w.Add(tf);
var wizard = new Wizard
{
X = 0,
Y = 1,
Width = Dim.Fill(),
Height = Dim.Fill(),
Modal = false,
TabStop = true
};
var step = new Wizard.WizardStep("Yarg");
step.Add(new Label("SomeText:"));
step.Add(new TextField() { Y=1,Width = 10});
step.Add(new Label("SomeText2:") { Y = 2, });
step.Add(new TextField() { Y = 3, Width = 10 });
wizard.AddStep(step);
var step2 = new Wizard.WizardStep("Blerg");
step2.Add(new Label("SomeText3:"));
step2.Add(new TextField() { Y = 1, Width = 10 });
wizard.AddStep(step2);
w.Add(wizard);
Application.Run(w);
Application.Shutdown(); |
It's happening in my project too. The example above also produces identical effect. I found out, that this started to happen after this commit. When rolled back to previous commit, background is not shifting to gray anymore. That problem also occures on version 1.12.1 and latest develop commit, so it's not fixed yet. |
I'll look into this asap! |
It turns out that the problem does not only occur with Wizard, but also with TabView. You can see this using the code below, but the TabView Demo from UICatalog (tab "Interactive Tab") also has this bug. Application.Init();
Toplevel top = Application.Top;
Window mainWindow = new Window("MainWindow");
View tabTestView = new View() { Height = Dim.Fill(), Width = Dim.Fill() };
tabTestView.Add(new Label("SomeText:") { Y = 0 });
tabTestView.Add(new TextField() { Y = 1, Width = 10 });
tabTestView.Add(new Label("SomeText2:") { Y = 2 });
tabTestView.Add(new TextField() { Y = 3, Width = 10 });
TabView tabs = new TabView()
{
Width = Dim.Fill(),
Height = Dim.Fill()
};
tabs.AddTab(new TabView.Tab("Tab1", tabTestView),false);
mainWindow.Add(tabs);
top.Add(mainWindow);
Application.Run();
Application.Shutdown(); |
The fix was done @Piotr86PL in f019826. |
I also had this issue and have another one that in my view is related to the fix. If have a dialog, containing a TabView. There is text from the first tab showing up when switching to other tabs. Best to show it: Like the content of the first tab still exists in the upper left corner of the main window (and only there - in my case you don't notice that when the dialog is centered, e.g. on a large screen). @BDisp Can it be that this line...
...is also needed after this: Terminal.Gui/Terminal.Gui/Views/TabView.cs Lines 83 to 85 in 577fae1
Same here:
It seems to solve the issue and the characters are gone. |
Can you reproduce this on the v2 too? Can you please write s small example that reproduce this for to more quicker find the cause? Thanks. |
@BDisp Thanks for the reponse! I'm bound to v1. The UI is moderately complex, I need to strip it down. Hope to do that over the holidays. |
@heinrich-ulbricht can you please test with the PR #3194 to confirm if it's working well now for you. Thanks. |
Describe the bug
Focusing on a wizard window tends to make the background gray which tends to mess up the look.
To Reproduce
Open a wizard and click the view. It's most noticeable with textboxes an stuff.
Expected behavior
I expected the clicked element, buttons/textboxes/etc,. to change color to show they're focused, instead the whole window went gray.
Screenshots

The text was updated successfully, but these errors were encountered: