Add title text rendering for windows

This commit is contained in:
Stone_Red
2026-06-13 16:32:49 +02:00
parent decd79e6d3
commit c125e31563
+2
View File
@@ -167,12 +167,14 @@ public sealed class CanvasRenderSource : IRenderSource
{
Size size = Get(command.Properties, "Size", new Size(160, 120));
bool focused = Get(command.Properties, "IsFocused", false);
string titleText = Get(command.Properties, "Title", string.Empty);
Color border = focused ? Color.White : Color.DarkGray;
Color title = focused ? Color.FromArgb(0, 120, 215) : Color.FromArgb(80, 80, 80);
canvas.DrawFilledRectangle(Color.FromArgb(32, 32, 32), 0, 0, size.Width, size.Height);
canvas.DrawFilledRectangle(title, 0, 0, size.Width, 18);
canvas.DrawString(titleText, PCScreenFont.DefaultFont., Color.White, 4, 2);
canvas.DrawRectangle(border, 0, 0, size.Width, size.Height);
}