question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Border color doesn't change when changing color scheme

See original GitHub issue

Describe 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:

  1. Create a new application using Terminal.Gui
  2. Add a new Window and add a FrameView and a Button into the Window
  3. Change the ColorScheme on the button click
  4. 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: image

After button click: image

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:closed
  • Created 4 months ago
  • Comments:19

github_iconTop GitHub Comments

1reaction
Binto86commented, May 30, 2023

I will quickly clone the repo and test this locally

1reaction
Binto86commented, May 30, 2023

@BDisp I know about this workaround, I just think that I shouldn’t need to us it.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found