@@ -72,13 +72,19 @@ public override async Task<Image<Rgba32>> RenderFrameAsync(int width, int height
7272 // Resource usage bars
7373 var barY = boxY + boxHeight + 30 ;
7474 var barHeight = 20 ;
75- var barWidth = width / 2 - 130 ; // Leave margins: 20 left + 80 label + 30 gap in middle
76-
77- DrawText ( ctx , "CPU:" , 20 , barY , LabelFont ! , SecondaryTextColor , 80 ) ;
78- DrawProgressBar ( ctx , metrics . Summary . CpuUsagePercent , 100 , barY , barWidth , barHeight ) ;
79-
80- DrawText ( ctx , "RAM:" , width / 2 + 20 , barY , LabelFont ! , SecondaryTextColor , 80 ) ;
81- DrawProgressBar ( ctx , metrics . Summary . MemoryUsagePercent , width / 2 + 100 , barY , barWidth , barHeight ) ;
75+ var labelWidth = 60 ;
76+ var margin = 20 ;
77+ var centerGap = 40 ;
78+ // Each bar: margin + label + bar + centerGap/2 = width/2
79+ // barWidth = width/2 - margin - labelWidth - centerGap/2
80+ var barWidth = width / 2 - margin - labelWidth - centerGap ;
81+
82+ DrawText ( ctx , "CPU:" , margin , barY , LabelFont ! , SecondaryTextColor , labelWidth ) ;
83+ DrawProgressBar ( ctx , metrics . Summary . CpuUsagePercent , margin + labelWidth , barY , barWidth , barHeight ) ;
84+
85+ var rightStart = width / 2 + centerGap / 2 ;
86+ DrawText ( ctx , "RAM:" , rightStart , barY , LabelFont ! , SecondaryTextColor , labelWidth ) ;
87+ DrawProgressBar ( ctx , metrics . Summary . MemoryUsagePercent , rightStart + labelWidth , barY , barWidth , barHeight ) ;
8288
8389 // Recent alert (if any)
8490 if ( metrics . Alerts . Count > 0 )
0 commit comments