|
@@ -331,12 +331,11 @@ namespace Terminal.Gui {
|
|
|
private Point effect3DOffset = new Point (1, 1);
|
|
|
private Attribute? effect3DBrush;
|
|
|
private ustring title = ustring.Empty;
|
|
|
- private View child;
|
|
|
|
|
|
/// <summary>
|
|
|
/// Specifies the <see cref="Gui.BorderStyle"/> for a view.
|
|
|
/// </summary>
|
|
|
- [JsonInclude, JsonConverter (typeof(JsonStringEnumConverter))]
|
|
|
+ [JsonInclude, JsonConverter (typeof (JsonStringEnumConverter))]
|
|
|
public BorderStyle BorderStyle {
|
|
|
get => borderStyle;
|
|
|
set {
|
|
@@ -651,7 +650,7 @@ namespace Terminal.Gui {
|
|
|
Child.Clear (borderRect);
|
|
|
}
|
|
|
|
|
|
- driver.SetAttribute (new Attribute (BorderBrush, Background));
|
|
|
+ driver.SetAttribute (savedAttribute);
|
|
|
|
|
|
// Draw margin frame
|
|
|
if (DrawMarginFrame) {
|
|
@@ -675,7 +674,6 @@ namespace Terminal.Gui {
|
|
|
driver.DrawWindowFrame (borderRect, 1, 1, 1, 1, BorderStyle != BorderStyle.None, fill: true, this);
|
|
|
}
|
|
|
}
|
|
|
- driver.SetAttribute (savedAttribute);
|
|
|
}
|
|
|
|
|
|
private void DrawChildBorder (Rect frame, bool fill = true)
|
|
@@ -788,7 +786,7 @@ namespace Terminal.Gui {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- driver.SetAttribute (new Attribute (BorderBrush, Background));
|
|
|
+ driver.SetAttribute (savedAttribute);
|
|
|
|
|
|
// Draw the MarginFrame
|
|
|
if (DrawMarginFrame) {
|
|
@@ -985,7 +983,7 @@ namespace Terminal.Gui {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- driver.SetAttribute (new Attribute (BorderBrush, Background));
|
|
|
+ driver.SetAttribute (savedAttribute);
|
|
|
|
|
|
// Draw the MarginFrame
|
|
|
if (DrawMarginFrame) {
|
|
@@ -1079,7 +1077,7 @@ namespace Terminal.Gui {
|
|
|
driver.DrawWindowTitle (scrRect, Title, 0, 0, 0, 0);
|
|
|
} else {
|
|
|
scrRect = view.ViewToScreen (new Rect (0, 0, view.Frame.Width, view.Frame.Height));
|
|
|
- driver.DrawWindowTitle (scrRect, Parent.Border.Title,
|
|
|
+ driver.DrawWindowTitle (scrRect, Title,
|
|
|
padding.Left, padding.Top, padding.Right, padding.Bottom);
|
|
|
}
|
|
|
}
|
|
@@ -1095,9 +1093,9 @@ namespace Terminal.Gui {
|
|
|
{
|
|
|
var driver = Application.Driver;
|
|
|
if (DrawMarginFrame) {
|
|
|
- driver.SetAttribute (new Attribute (BorderBrush, Background));
|
|
|
+ driver.SetAttribute (view.GetNormalColor ());
|
|
|
if (view.HasFocus) {
|
|
|
- driver.SetAttribute (new Attribute (view.ColorScheme.HotNormal.Foreground, Background));
|
|
|
+ driver.SetAttribute (view.ColorScheme.HotNormal);
|
|
|
}
|
|
|
var padding = Parent.Border.GetSumThickness ();
|
|
|
var scrRect = Parent.ViewToScreen (new Rect (0, 0, rect.Width, rect.Height));
|