From 0b6cd3eccf87535c62772d6586ac385b7a8730b3 Mon Sep 17 00:00:00 2001 From: Kara Date: Sun, 2 Apr 2023 22:27:10 -0700 Subject: [PATCH] Revert "Don't draw text contents over scrollbar for outputpanel (#3876)" This reverts commit 7b60f5bd06e9feccd0ba1402054cf87f00d7c3e8. --- Robust.Client/UserInterface/Controls/OutputPanel.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Robust.Client/UserInterface/Controls/OutputPanel.cs b/Robust.Client/UserInterface/Controls/OutputPanel.cs index 4ef7c58d7..0d11337a6 100644 --- a/Robust.Client/UserInterface/Controls/OutputPanel.cs +++ b/Robust.Client/UserInterface/Controls/OutputPanel.cs @@ -29,11 +29,6 @@ namespace Robust.Client.UserInterface.Controls public bool ScrollFollowing { get; set; } = true; - /// - /// Margin between the text and the scrollbar. - /// - public float ScrollMargin = 4f; - public OutputPanel() { IoCManager.InjectDependencies(this); @@ -43,7 +38,7 @@ namespace Robust.Client.UserInterface.Controls _scrollBar = new VScrollBar { Name = "_v_scroll", - HorizontalAlignment = HAlignment.Right, + HorizontalAlignment = HAlignment.Right }; AddChild(_scrollBar); _scrollBar.OnValueChanged += _ => _isAtBottom = _scrollBar.IsAtEnd; @@ -235,8 +230,7 @@ namespace Robust.Client.UserInterface.Controls private UIBox2 _getContentBox() { var style = _getStyleBox(); - var box = style?.GetContentBox(PixelSizeBox) ?? PixelSizeBox; - return new UIBox2(box.Left, box.Top, box.Right - _scrollBar.SizeBox.Width - Margin.Right - ScrollMargin, box.Bottom); + return style?.GetContentBox(PixelSizeBox) ?? PixelSizeBox; } protected internal override void UIScaleChanged()