Skip to content

'Margin' without shadow should not always cause redraw #3984

Closed
@tig

Description

@tig

Image

I suspect it's something to do with Clip...

This is Generic modified thusly:

public override void Main ()
{
    // Init
    Application.Init ();

    // Setup - Create a top-level application window and configure it.
    Window appWindow = new ()
    {
        Title = GetQuitKeyAndName (),
    };

    FrameView frame = new ()
    {
        Height = Dim.Fill (),
        Width = Dim.Fill (),
        Title = "Frame"
    };
    appWindow.Add (frame);

    var button = new Button { Id = "button", X = Pos.Center (), Y = 1, Text = "_Press me!" };

    button.Accepting += (s, e) =>
                        {
                            // Anytime Accepting is handled, make sure to set e.Cancel to false.
                            e.Cancel = true;
                            MessageBox.ErrorQuery ("Error", "You pressed the button!", "_Ok");
                        };

    frame.Add (button);

    // Run - Start the application.
    Application.Run (appWindow);
    appWindow.Dispose ();

    // Shutdown - Calling Application.Shutdown is required.
    Application.Shutdown ();
}

I'll work on a unit test that demonstrates this next.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    ✅ Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions