mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-31 02:08:03 +01:00
Simplified FindDeepestView
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
|
||||
// TODO: Missing 3D effect - 3D effects will be drawn by a mechanism separate from Adornments
|
||||
// TODO: If a Adornment has focus, navigation keys (e.g Command.NextView) should cycle through SubViews of the Adornments
|
||||
// TODO: Why don't we let Frame.X/Y be the location of the Adornment> Why always 0?
|
||||
// QUESTION: How does a user navigate out of an Adornment to another Adornment, or back into the Parent's SubViews?
|
||||
|
||||
/// <summary>
|
||||
@@ -144,7 +143,7 @@ public class Adornment : View
|
||||
|
||||
// This just draws/clears the thickness, not the insides.
|
||||
Driver.SetAttribute (normalAttr);
|
||||
Thickness.Draw (screenBounds, (string)(Data ?? string.Empty));
|
||||
Thickness.Draw (screenBounds, ToString ());
|
||||
|
||||
if (!string.IsNullOrEmpty (TextFormatter.Text))
|
||||
{
|
||||
|
||||
@@ -580,13 +580,10 @@ public partial class View
|
||||
return start.Margin;
|
||||
}
|
||||
|
||||
// TODO: Move this logic into Adornment? Why can't Adornment.Frame be used?
|
||||
if (start.Border.Thickness.Contains (
|
||||
new (
|
||||
start.Frame.X + start.Margin.Thickness.Left,
|
||||
start.Frame.Y + start.Margin.Thickness.Top,
|
||||
start.Frame.Width - start.Margin.Thickness.Horizontal,
|
||||
start.Frame.Height - start.Margin.Thickness.Vertical),
|
||||
start.Border.Frame with {
|
||||
X = start.Frame.X + start.Border.Frame.X,
|
||||
Y = start.Frame.Y + start.Border.Frame.Y },
|
||||
x,
|
||||
y))
|
||||
{
|
||||
@@ -594,14 +591,13 @@ public partial class View
|
||||
}
|
||||
|
||||
if (start.Padding.Thickness.Contains (
|
||||
new (
|
||||
start.Frame.X + start.Margin.Thickness.Left + start.Border.Thickness.Left,
|
||||
start.Frame.Y + start.Margin.Thickness.Top + start.Border.Thickness.Top,
|
||||
start.Frame.Width - start.Margin.Thickness.Horizontal - start.Border.Thickness.Horizontal,
|
||||
start.Frame.Height - start.Margin.Thickness.Vertical - start.Border.Thickness.Vertical),
|
||||
start.Padding.Frame with
|
||||
{
|
||||
X = start.Frame.X + start.Padding.Frame.X,
|
||||
Y = start.Frame.Y + start.Padding.Frame.Y
|
||||
},
|
||||
x,
|
||||
y))
|
||||
|
||||
{
|
||||
return start.Padding;
|
||||
}
|
||||
@@ -716,7 +712,7 @@ public partial class View
|
||||
LayoutAdornments ();
|
||||
|
||||
Rectangle oldBounds = Bounds;
|
||||
OnLayoutStarted (new() { OldBounds = oldBounds });
|
||||
OnLayoutStarted (new () { OldBounds = oldBounds });
|
||||
|
||||
SetTextFormatterSize ();
|
||||
|
||||
@@ -743,7 +739,7 @@ public partial class View
|
||||
|
||||
LayoutNeeded = false;
|
||||
|
||||
OnLayoutComplete (new() { OldBounds = oldBounds });
|
||||
OnLayoutComplete (new () { OldBounds = oldBounds });
|
||||
}
|
||||
|
||||
/// <summary>Converts a screen-relative coordinate to a bounds-relative coordinate.</summary>
|
||||
|
||||
Reference in New Issue
Block a user