@@ -130,39 +130,56 @@ private void BuildTopStatusBar(Window mainWindow)
130130
131131 #region Metrics Grid
132132
133- private static BarGraphControl BuildMetricsBar ( string name , string label , int labelWidth , Color [ ] gradient , int marginLeft = 1 , int marginRight = 0 , int marginBottom = 0 )
133+ private static BarGraphControl BuildMetricsBar ( string name , string label , int labelWidth , Color [ ] gradient )
134134 {
135135 return new BarGraphBuilder ( )
136136 . WithName ( name ) . WithLabel ( label ) . WithLabelWidth ( labelWidth )
137- . WithValue ( 0 ) . WithMaxValue ( 100 ) . WithBarWidth ( UIConstants . MetricsBarWidth )
137+ . WithValue ( 0 ) . WithMaxValue ( 100 )
138138 . WithUnfilledColor ( UIConstants . BarUnfilledColor )
139+ . WithAlignment ( HorizontalAlignment . Stretch )
139140 . ShowLabel ( ) . ShowValue ( ) . WithValueFormat ( "F1" )
140- . WithMargin ( marginLeft , 0 , marginRight , marginBottom )
141+ . WithMargin ( 1 , 0 , 1 , 0 )
141142 . WithSmoothGradient ( gradient )
142143 . Build ( ) ;
143144 }
144145
145146 private void BuildMetricsGrid ( Window mainWindow )
146147 {
147- var muted = UIConstants . MutedText . ToMarkup ( ) ;
148+ var accent = UIConstants . Accent . ToMarkup ( ) ;
148149 var metricsGrid = Controls . HorizontalGrid ( )
149150 . WithMargin ( 0 , 0 , 0 , 0 )
150151 . Column ( col =>
151- col . Add ( Controls . Markup ( $ "[{ muted } bold] CPU[/]") . WithMargin ( 0 , 0 , 0 , 0 ) . Build ( ) )
152+ col . Add ( Controls . Markup ( $ "[{ accent } bold] CPU[/]") . WithMargin ( 0 , 0 , 0 , 0 ) . Build ( ) )
152153 . Add ( BuildMetricsBar ( "cpuUserBar" , "User" , UIConstants . MetricsCpuLabelWidth , UIConstants . GradientHealthy ) )
153- . Add ( BuildMetricsBar ( "cpuSystemBar" , "Sys" , UIConstants . MetricsCpuLabelWidth , UIConstants . SparkCpuSystem ) )
154- . Add ( BuildMetricsBar ( "cpuIoWaitBar" , "IO" , UIConstants . MetricsCpuLabelWidth , UIConstants . GradientIoRead ) ) )
155- . Column ( col => col . Width ( 1 ) )
154+ . Add ( BuildMetricsBar ( "cpuSystemBar" , "System" , UIConstants . MetricsCpuLabelWidth , UIConstants . SparkCpuSystem ) )
155+ . Add ( BuildMetricsBar ( "cpuIoWaitBar" , "IOwait" , UIConstants . MetricsCpuLabelWidth , UIConstants . GradientIoRead ) ) )
156156 . Column ( col =>
157- col . Add ( Controls . Markup ( $ "[{ muted } bold] Memory[/]") . WithMargin ( 0 , 0 , 0 , 0 ) . Build ( ) )
158- . Add ( BuildMetricsBar ( "memUsedBar" , "Used" , UIConstants . MetricsMemLabelWidth , UIConstants . GradientHealthy , marginRight : 1 ) )
159- . Add ( BuildMetricsBar ( "memCachedBar" , "Cache" , UIConstants . MetricsMemLabelWidth , UIConstants . SparkMemCached , marginRight : 1 ) )
160- . Add ( BuildMetricsBar ( "memIoBar" , "IO" , UIConstants . MetricsMemLabelWidth , UIConstants . GradientIoWrite , marginRight : 1 ) ) )
161- . Column ( col => col . Width ( 1 ) )
157+ {
158+ col . Width ( 1 ) ;
159+ col . Add ( new SeparatorControl
160+ {
161+ ForegroundColor = UIConstants . SeparatorColor ,
162+ VerticalAlignment = VerticalAlignment . Fill
163+ } ) ;
164+ } )
165+ . Column ( col =>
166+ col . Add ( Controls . Markup ( $ "[{ accent } bold] Memory[/]") . WithMargin ( 0 , 0 , 0 , 0 ) . Build ( ) )
167+ . Add ( BuildMetricsBar ( "memUsedBar" , "Used %" , UIConstants . MetricsMemLabelWidth , UIConstants . GradientHealthy ) )
168+ . Add ( BuildMetricsBar ( "memCachedBar" , "Cached %" , UIConstants . MetricsMemLabelWidth , UIConstants . SparkMemCached ) )
169+ . Add ( BuildMetricsBar ( "memIoBar" , "Disk IO" , UIConstants . MetricsMemLabelWidth , UIConstants . GradientIoWrite ) ) )
170+ . Column ( col =>
171+ {
172+ col . Width ( 1 ) ;
173+ col . Add ( new SeparatorControl
174+ {
175+ ForegroundColor = UIConstants . SeparatorColor ,
176+ VerticalAlignment = VerticalAlignment . Fill
177+ } ) ;
178+ } )
162179 . Column ( col =>
163- col . Add ( Controls . Markup ( $ "[{ muted } bold] Network[/]") . WithMargin ( 0 , 0 , 0 , 0 ) . Build ( ) )
164- . Add ( BuildMetricsBar ( "netUploadBar" , "Up " , UIConstants . MetricsNetLabelWidth , UIConstants . GradientNetUpload , marginRight : 1 ) )
165- . Add ( BuildMetricsBar ( "netDownloadBar" , "Down " , UIConstants . MetricsNetLabelWidth , UIConstants . GradientNetDownload , marginRight : 1 ) ) )
180+ col . Add ( Controls . Markup ( $ "[{ accent } bold] Network[/]") . WithMargin ( 0 , 0 , 0 , 0 ) . Build ( ) )
181+ . Add ( BuildMetricsBar ( "netUploadBar" , "Upload " , UIConstants . MetricsNetLabelWidth , UIConstants . GradientNetUpload ) )
182+ . Add ( BuildMetricsBar ( "netDownloadBar" , "Download " , UIConstants . MetricsNetLabelWidth , UIConstants . GradientNetDownload ) ) )
166183 . WithAlignment ( HorizontalAlignment . Stretch )
167184 . Build ( ) ;
168185
0 commit comments