@@ -1493,22 +1493,22 @@ private void BuildPlanDetails(CpuTuneResult r)
14931493
14941494 PlanDetailsList . Children . Add ( new System . Windows . Controls . TextBlock
14951495 {
1496- Text = "Changes from stock (applied to both plugged-in and on-battery) :",
1496+ Text = $ "Side by side (plugged in) — bold values are what GamerGuardian changes :",
14971497 FontWeight = FontWeights . SemiBold ,
14981498 FontSize = 12 ,
14991499 TextWrapping = TextWrapping . Wrap ,
1500- Margin = new Thickness ( 0 , 10 , 0 , 0 ) ,
1500+ Margin = new Thickness ( 0 , 12 , 0 , 4 ) ,
15011501 } ) ;
1502- foreach ( var change in CpuPlanDetails . Changes ( r ) )
1503- {
1504- PlanDetailsList . Children . Add ( new System . Windows . Controls . TextBlock
1505- {
1506- Text = "• " + change ,
1507- FontSize = 12 ,
1508- TextWrapping = TextWrapping . Wrap ,
1509- Margin = new Thickness ( 8 , 2 , 0 , 0 ) ,
1510- } ) ;
1511- }
1502+
1503+ // Read the stock values live from the installed base scheme so the "Windows"
1504+ // column reflects this machine rather than a hardcoded guess (the app never
1505+ // trusts hardcoded power values — see the Power Saver GUID gotcha).
1506+ var baseGuid = PowerPlanMonitor . ResolveBalancedBase ( ) ;
1507+ Func < Guid , Guid , uint ? > readBase = baseGuid == Guid . Empty
1508+ ? ( _ , _ ) => null
1509+ : ( sub , set ) => Powrprof . ReadAcValue ( baseGuid , sub , set ) ;
1510+ var comparison = CpuPlanDetails . Comparison ( r , readBase ) ;
1511+ PlanDetailsList . Children . Add ( BuildComparisonTable ( comparison , r . BasePlanDisplayName ) ) ;
15121512
15131513 PlanDetailsList . Children . Add ( new System . Windows . Controls . TextBlock
15141514 {
@@ -1528,6 +1528,70 @@ private void BuildPlanDetails(CpuTuneResult r)
15281528 } ) ;
15291529 }
15301530
1531+ /// <summary>
1532+ /// Builds the "Windows base vs GamerGuardian" comparison as a 3-column grid.
1533+ /// A value that GamerGuardian changes from the stock value is shown bold so the
1534+ /// real differences stand out from settings it merely pins to the same value.
1535+ /// </summary>
1536+ private System . Windows . Controls . Grid BuildComparisonTable (
1537+ IReadOnlyList < CpuPlanDetails . PlanComparisonRow > rows , string baseName )
1538+ {
1539+ var grid = new System . Windows . Controls . Grid ( ) ;
1540+ grid . ColumnDefinitions . Add ( new System . Windows . Controls . ColumnDefinition { Width = new GridLength ( 1 , GridUnitType . Star ) } ) ;
1541+ grid . ColumnDefinitions . Add ( new System . Windows . Controls . ColumnDefinition { Width = new GridLength ( 120 ) } ) ;
1542+ grid . ColumnDefinitions . Add ( new System . Windows . Controls . ColumnDefinition { Width = new GridLength ( 120 ) } ) ;
1543+
1544+ var secondary = ( System . Windows . Media . Brush ) FindResource ( "TextFillColorSecondaryBrush" ) ;
1545+
1546+ void AddCell ( int row , int col , string text , FontWeight weight , System . Windows . Media . Brush ? fg )
1547+ {
1548+ var tb = new System . Windows . Controls . TextBlock
1549+ {
1550+ Text = text ,
1551+ FontSize = 12 ,
1552+ FontWeight = weight ,
1553+ TextWrapping = TextWrapping . Wrap ,
1554+ Margin = new Thickness ( col == 0 ? 0 : 8 , 3 , 8 , 3 ) ,
1555+ } ;
1556+ if ( fg is not null ) tb . Foreground = fg ;
1557+ System . Windows . Controls . Grid . SetRow ( tb , row ) ;
1558+ System . Windows . Controls . Grid . SetColumn ( tb , col ) ;
1559+ grid . Children . Add ( tb ) ;
1560+ }
1561+
1562+ // Header row.
1563+ grid . RowDefinitions . Add ( new System . Windows . Controls . RowDefinition { Height = GridLength . Auto } ) ;
1564+ AddCell ( 0 , 0 , "Setting" , FontWeights . SemiBold , null ) ;
1565+ AddCell ( 0 , 1 , $ "Windows { baseName } ", FontWeights . SemiBold , null ) ;
1566+ AddCell ( 0 , 2 , "GamerGuardian" , FontWeights . SemiBold , null ) ;
1567+
1568+ // Separator under the header.
1569+ grid . RowDefinitions . Add ( new System . Windows . Controls . RowDefinition { Height = GridLength . Auto } ) ;
1570+ var sep = new System . Windows . Controls . Border
1571+ {
1572+ Height = 1 ,
1573+ Background = ( System . Windows . Media . Brush ) FindResource ( "ControlStrokeColorDefaultBrush" ) ,
1574+ Margin = new Thickness ( 0 , 1 , 0 , 3 ) ,
1575+ } ;
1576+ System . Windows . Controls . Grid . SetRow ( sep , 1 ) ;
1577+ System . Windows . Controls . Grid . SetColumn ( sep , 0 ) ;
1578+ System . Windows . Controls . Grid . SetColumnSpan ( sep , 3 ) ;
1579+ grid . Children . Add ( sep ) ;
1580+
1581+ for ( int i = 0 ; i < rows . Count ; i ++ )
1582+ {
1583+ int row = i + 2 ;
1584+ grid . RowDefinitions . Add ( new System . Windows . Controls . RowDefinition { Height = GridLength . Auto } ) ;
1585+ AddCell ( row , 0 , rows [ i ] . Setting , FontWeights . Normal , null ) ;
1586+ AddCell ( row , 1 , rows [ i ] . WindowsValue , FontWeights . Normal , secondary ) ;
1587+ // Bold the GamerGuardian value only where it actually differs from stock.
1588+ AddCell ( row , 2 , rows [ i ] . GamerGuardianValue ,
1589+ rows [ i ] . Differs ? FontWeights . SemiBold : FontWeights . Normal , null ) ;
1590+ }
1591+
1592+ return grid ;
1593+ }
1594+
15311595 private void BuildDependencyRows ( CpuTuneResult r )
15321596 {
15331597 CcdDependencyList . Children . Clear ( ) ;
0 commit comments