From f911bf5f5b5bcd5385483348c1ccb172aa737126 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 11 Jul 2017 15:02:44 -0400 Subject: Fix fuzzy text rendering and fix wrapping --- ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs') diff --git a/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs b/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs index d8fdf2e..942b8b6 100644 --- a/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs +++ b/ShiftOS.Frontend/GraphicsSubsystem/UIManager.cs @@ -94,6 +94,18 @@ namespace ShiftOS.Frontend.GraphicsSubsystem else { _target = TextureCaches[hc]; + if(_target.Width != ctrl.Width || _target.Height != ctrl.Height) + { + _target = new RenderTarget2D( + graphics, + ctrl.Width, + ctrl.Height, + false, + graphics.PresentationParameters.BackBufferFormat, + DepthFormat.Depth24); + TextureCaches[hc] = _target; + + } } if (ctrl.RequiresPaint) { @@ -188,7 +200,7 @@ namespace ShiftOS.Frontend.GraphicsSubsystem { var color = (System.Drawing.Color)colorfield.GetValue(SkinEngine.LoadedSkin); var tex2 = new Texture2D(graphics, 1, 1); - tex2.SetData(new[] { color.B, color.G, color.R, color.A }); + tex2.SetData(new[] { color.R, color.G, color.B, color.A }); SkinTextures.Add(colorfield.Name, tex2); } -- cgit v1.2.3