Partially Fixes #2483 - Removes old Border and leverages LineCanvas for Frames, etc...#2527
Conversation
…_borders_fixes_2483
|
In addition to the updates in the first comment of this PR...
|
|
Looking into gif above, the current window being drag should be bring to front to overlap the others. Another issue is the borders being visible inside two windows. Only the border of the window being dragged should be visible inside others windows. |
Right. These are all things that will need to be fixed before al this is done. Related: #2537
This would bein
Yes. My original plan, which is now partially implemented in this PR, was to have subviews just render to their SuperView's Instead, we'll have the subviews render to their own |
For sure I don´t like the current result. The question is what aspect should it has to have, since the |
| public static void AssertEqual (ITestOutputHelper output, string expectedLook, string actualLook) | ||
| { | ||
| // Convert newlines to platform-specific newlines | ||
| expectedLook = expectedLook.Replace ("\r\n", Environment.NewLine); |
There was a problem hiding this comment.
@tig it seems that you are only testing on Linux because this will throw an exception if testing on Windows. You have to add the follow line:
if (Environment.NewLine.Length == 2 && !expectedLook.Contains ("\r\n")) {
expectedLook = expectedLook.Replace ("\n", Environment.NewLine);
} else if (Environment.NewLine.Length == 1) {
expectedLook = expectedLook.Replace ("\r\n", Environment.NewLine);
}| public static void AssertEqual (ITestOutputHelper output, string expectedLook, ustring actualLook) | ||
| { | ||
| // Convert newlines to platform-specific newlines | ||
| expectedLook = expectedLook.Replace ("\r\n", Environment.NewLine); |
There was a problem hiding this comment.
@tig it seems that you are only testing on Linux because this will throw an exception if testing on Windows. You have to add the follow line:
if (Environment.NewLine.Length == 2 && !expectedLook.Contains ("\r\n")) {
expectedLook = expectedLook.Replace ("\n", Environment.NewLine);
} else {
expectedLook = expectedLook.Replace ("\r\n", Environment.NewLine);
}| expectedLook = expectedLook.Replace ("\r\n", Environment.NewLine); | ||
|
|
||
| // If test is about to fail show user what things looked like | ||
| if (!string.Equals (expectedLook, actualLook)) { |
There was a problem hiding this comment.
To verify the equality you have to add ToString() for the ustring,
if (!string.Equals (expectedLook, actualLook.ToString ())) {
Expected. |
V2 autojoin borders fixes 2483 fix
@tig I already had fixed this but when I merged from your repo to submit a PR, I get a bunch of errors again. |
| // Invoke DrawContentCompleteEvent | ||
| OnDrawContentComplete (bounds); | ||
|
|
||
| OnDrawFrames (); |
There was a problem hiding this comment.
OnDrawFrames must be the first call on a Draw, otherwise the frames will always overlap the other views frames.


This PR is fairly massive, but also super cool (I think).
It includes:
TileView- UseLineCanvasto draw borders and auto-join borders #2483LineCanvasproperty toView. If the newUseSuperViewLineCanvasproperty is true (default is false) then theBorder(aFrame) will use the view's SuperView'sLineCanvas. This enables auto-join. But there are a bunch of edge cases for this to work smoothly that I'll tackle in a future PR that will complete Remove need forTileView- UseLineCanvasto draw borders and auto-join borders #2483.LineCanvas ExperimentssetsUseSuperViewLineCanvasto true so you can play around with this.has two minds about whatLength == 0` means #2530LineCanvasand does some refactoring to ease testing (Clear,Bounds,ToString, ...)LineCanvasunit testsRectwith a betterUnionmethod that supports Rects with negative coords; changesToStringto match .NET style; Adds unit testsLineclass that will eventually replaceLineView. For now it's only used in a "LineCanvas Experiments" for testing.ConsoleDriver.DrawWindowFrameandConsoleDriver.DrawWindowTitleView.DrawFrametoFrame.DrawFrame(still obsolete and not long for this world once the few Views that use it get refactored).DrawTitletoFrame(temporary API)BorderFrametoBorderTestHelpersSetupFakeDriverAttributethat simply setsApplication.Driver = new FakeDriver()so code likeLineCanvasthat needs a driver can work without the overhead ofAutoInitShutdown(which makes unit tests slower)outputand the CRAZYAssserDriverContentsAre...functions which cause hair loss.Pull Request checklist:
CTRL-K-Dto automatically reformat your files before committing.dotnet testbefore commit///style comments)