mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
* Illustrates #2331 (Scrollview not respecting clip) does not reproduce (#2332) * Proves that the issue #2331 don't have reason to happen. * fixes #2336 * Fixes #2331. ScrollView may not be honoring clip region; CustomButton shows outside * More appropriate solution for the issue #2331. * Start refactoring LineCanvas for mixing line style support (e.g. double into single) * Add remaining resolvers * Implement corner border style mixing in LineCanvas * Refactor and simplify resolvers * Move tests to Core folder and namespace to Terminal.Gui.CoreTests * Fixes #2333. TextField is selecting badly a word on double click. * Add unit test deleting a word with accented char. * Fixes 2331. ScrollView may not be honoring clip region. * Add a custom button scenario. * Fixes #2350. Clipping broke (see Clipping scenario). * Is preferable use NeedDisplay instead of Bounds. --------- Co-authored-by: Tig Kindel <tig@users.noreply.github.com> Co-authored-by: tznind <tznind@dundee.ac.uk> * Fixes ASCIICustomButton scenario. * Adds Snake Scenario (#2353) * Add empty snake scenario * Move snake head around * Snake now has a tail * Rest of logic implementation * Ctrl K D layout fixes * Game gets faster as you collect more apples * Adjust speed increase rate down * Use white on black for snake and border and red for apple * Fix ScenarioTests not Disposing Scenario * Add disposes and fix to use LineCanvas.GenerateImage * Fix stack overflow, doh! --------- Co-authored-by: Tig <tig@users.noreply.github.com> * Fixes 2368. Nested views with height of 1 not rendering correctly. --------- Co-authored-by: Tig Kindel <tig@users.noreply.github.com> Co-authored-by: tznind <tznind@dundee.ac.uk> Co-authored-by: Thomas Nind <31306100+tznind@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using NStack;
|
||||
using System;
|
||||
using Terminal.Gui.Graphs;
|
||||
using Xunit;
|
||||
using Xunit.Abstractions;
|
||||
//using GraphViewTests = Terminal.Gui.Views.GraphViewTests;
|
||||
@@ -4489,5 +4490,31 @@ At 0,0
|
||||
A text with some long width
|
||||
A text witith two lines. ", output);
|
||||
}
|
||||
|
||||
[Fact, AutoInitShutdown]
|
||||
public void Test_Nested_Views_With_Height_Equal_To_One ()
|
||||
{
|
||||
var v = new View () { Width = 11, Height = 3, ColorScheme = new ColorScheme () };
|
||||
|
||||
var top = new View () { Width = Dim.Fill (), Height = 1 };
|
||||
var bottom = new View () { Width = Dim.Fill (), Height = 1, Y = 2 };
|
||||
|
||||
top.Add (new Label ("111"));
|
||||
v.Add (top);
|
||||
v.Add (new LineView (Orientation.Horizontal) { Y = 1 });
|
||||
bottom.Add (new Label ("222"));
|
||||
v.Add (bottom);
|
||||
|
||||
v.LayoutSubviews ();
|
||||
v.Redraw (v.Bounds);
|
||||
|
||||
|
||||
string looksLike =
|
||||
@"
|
||||
111
|
||||
───────────
|
||||
222";
|
||||
TestHelpers.AssertDriverContentsAre (looksLike, output);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user