5555 hLogPanel_ = [] % bottom log uipanel (full-width)
5656 hLogText_ = [] % uitextarea inside hLogPanel_ (newest line first)
5757 hLiveBtn_ = [] % Live mode toggle button (in log strip header)
58+ hLastUpdateLbl_ = [] % "Updated 12:34:56" label next to live button
5859 LiveTimer_ = [] % MATLAB timer driving inspector refresh
5960 LivePeriod_ = 1.0 % seconds between live refreshes
6061 Theme_ = [] % resolved CompanionTheme struct
@@ -504,10 +505,10 @@ function buildLogStrip_(obj)
504505 g.RowSpacing = 4 ;
505506 g.BackgroundColor = t .WidgetBackground ;
506507
507- % Header row: label on the left, Live toggle on the right .
508- gHdr = uigridlayout(g , [1 2 ]);
508+ % Header row: log label | last-update timestamp | Live toggle.
509+ gHdr = uigridlayout(g , [1 3 ]);
509510 gHdr.Layout.Row = 1 ; gHdr.Layout.Column = 1 ;
510- gHdr.ColumnWidth = {' 1x' , 110 };
511+ gHdr.ColumnWidth = {' 1x' , 160 , 110 };
511512 gHdr.RowHeight = {' 1x' };
512513 gHdr.Padding = [0 0 0 0 ];
513514 gHdr.ColumnSpacing = 8 ;
@@ -519,8 +520,17 @@ function buildLogStrip_(obj)
519520 hLbl.FontColor = t .ForegroundColor ;
520521 hLbl.HorizontalAlignment = ' left' ; hLbl.VerticalAlignment = ' center' ;
521522
523+ obj.hLastUpdateLbl_ = uilabel(gHdr );
524+ obj.hLastUpdateLbl_.Layout.Row = 1 ; obj.hLastUpdateLbl_.Layout.Column = 2 ;
525+ obj.hLastUpdateLbl_.Text = ' Updated: --:--:--' ;
526+ obj.hLastUpdateLbl_.FontSize = 11 ; obj.hLastUpdateLbl_.FontName = ' Menlo' ;
527+ obj.hLastUpdateLbl_.FontColor = t .PlaceholderTextColor ;
528+ obj.hLastUpdateLbl_.HorizontalAlignment = ' right' ;
529+ obj.hLastUpdateLbl_.VerticalAlignment = ' center' ;
530+ obj.hLastUpdateLbl_.Tooltip = ' Time of the last successful live refresh' ;
531+
522532 obj.hLiveBtn_ = uibutton(gHdr , ' push' );
523- obj.hLiveBtn_.Layout.Row = 1 ; obj.hLiveBtn_.Layout.Column = 2 ;
533+ obj.hLiveBtn_.Layout.Row = 1 ; obj.hLiveBtn_.Layout.Column = 3 ;
524534 obj.hLiveBtn_.Text = ' Live: OFF' ;
525535 obj.hLiveBtn_.FontSize = 11 ; obj.hLiveBtn_.FontWeight = ' bold' ;
526536 obj.hLiveBtn_.Tooltip = ' Toggle live refresh of the inspector' ;
@@ -565,6 +575,10 @@ function onLiveTick_(obj)
565575 && ismethod(obj .InspectorPane_ , ' refreshLive' )
566576 obj .InspectorPane_ .refreshLive();
567577 end
578+ if ~isempty(obj .hLastUpdateLbl_ ) && isvalid(obj .hLastUpdateLbl_ )
579+ obj.hLastUpdateLbl_.Text = sprintf(' Updated: %s ' , ...
580+ char(datetime(' now' , ' Format' , ' HH:mm:ss' )));
581+ end
568582 catch
569583 % Live ticks must never crash the timer.
570584 end
0 commit comments