Changeset 115 for trunk/Game.pas


Ignore:
Timestamp:
Dec 11, 2024, 10:26:02 AM (11 days ago)
Author:
chronos
Message:
  • Modified: Automatically detect and use dark mode on Windows.
  • Modified: Use dark mode title bar on Windows 10.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Game.pas

    r113 r115  
    409409  // Clear background
    410410  MetaCanvas.Brush.Style := bsSolid;
    411   MetaCanvas.Brush.Color := Core.Core.ThemeManager1.Theme.ColorControl;
     411  MetaCanvas.Brush.Color := Core.Core.ThemeManager1.ActualTheme.ColorControl;
    412412  MetaCanvas.FillRect(0, 0, MetaCanvas.Width, MetaCanvas.Height);
    413413
     
    663663begin
    664664  with Canvas do begin
    665     Font.Color := Core.Core.ThemeManager1.Theme.ColorControlText;
     665    Font.Color := Core.Core.ThemeManager1.ActualTheme.ColorControlText;
    666666    Font.Size := Trunc(ScaleX(BoxFontSize, 96));
    667667
     
    671671
    672672    Brush.Style := bsSolid;
    673     Brush.Color := Core.Core.ThemeManager1.Theme.ColorWindow;
     673    Brush.Color := Core.Core.ThemeManager1.ActualTheme.ColorWindow;
    674674    FillRect(Pos.X, Pos.Y, Pos.X + BoxSize.Width, Pos.Y + BoxSize.Height);
    675675
     
    678678
    679679    Brush.Style := bsClear;
    680     Font.Color := Core.Core.ThemeManager1.Theme.ColorControlText;
     680    Font.Color := Core.Core.ThemeManager1.ActualTheme.ColorControlText;
    681681    Font.Size := Trunc(ScaleX(BoxFontSize, 96));
    682682    TextOut(Pos.X + (BoxSize.Width - TextWidth(Value)) div 2,
     
    11461146  Color: TPixel32;
    11471147begin
    1148   if (Core.Core.ThemeManager1.Theme.Name = ThemeNameDark) or
    1149   ((Core.Core.ThemeManager1.Theme.Name = ThemeNameSystem) and
     1148  if (Core.Core.ThemeManager1.ActualTheme.Name = ThemeNameDark) or
     1149  ((Core.Core.ThemeManager1.ActualTheme.Name = ThemeNameSystem) and
    11501150  Core.Core.ThemeManager1.IsDarkTheme)
    11511151  then begin
Note: See TracChangeset for help on using the changeset viewer.