Border color doesn't change when changing color scheme
See original GitHub issueDescribe the bug The border color of some Views (for example FrameView or Window) doesn’t change when changing color scheme while the application is running.
To Reproduce Steps to reproduce the behavior:
- Create a new application using Terminal.Gui
- Add a new Window and add a FrameView and a Button into the Window
- Change the ColorScheme on the button click
- Run the application and see, that when clicking the button, the color of everything except the border changes
Expected behavior The border foreground and background changes according to the new ColorScheme
Screenshots Before button click:
After button click:
Desktop (please complete the following information):
- OS: Windows 11
- Version 1.12.1 of Terminal.Gui
Aditional information The code I use to set up this example:
Application.Init();
var win = new Window("Test");
var frame = new FrameView()
{
X = 5,
Y = 10,
Width = Dim.Fill() - 5,
Height = Dim.Fill() - 10,
Title = "Test Frame",
};
var button = new Button(50, 0, "Change theme");
button.Clicked += () => Clicked();
win.Add(button, frame);
Application.Top.Add(win);
Application.Run();
Application.Shutdown();
void Clicked()
{
win.ColorScheme = new ColorScheme
{
Disabled = Attribute.Make(Color.White, Color.Black),
Normal = Attribute.Make(Color.Cyan, Color.Black),
HotNormal = Attribute.Make(Color.White, Color.Black),
Focus = Attribute.Make(Color.White, Color.Black),
HotFocus = Attribute.Make(Color.White, Color.Black),
};
}
Issue Analytics
- State:
- Created 4 months ago
- Comments:19
Top Results From Across the Web
Border color doesn't change when changing themes in iOS ...
Let's say border color is black when light mode and white when dark mode and system setting is dark mdoe. When I change...
Read more >can't modify border color in style
I am trying to change the border color for a heading in one of the style sets. I try to modify the style...
Read more >Can't change border color
Go to the border tab and change the color from automatic and then you have to re-apply the border, it will not change...
Read more >Inputs not changing according to colorScheme · Issue #7708
If you want to change the border color looks, you can create a semantic token and use that as the focusBorderColor. const theme...
Read more >Border doesn't change color
I created a digital product using Google Sheets and want to have multiple color variations. However, when I change the custom theme colors,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I will quickly clone the repo and test this locally
@BDisp I know about this workaround, I just think that I shouldn’t need to us it.