Ignore:
Timestamp:
Mar 4, 2022, 10:57:08 PM (2 years ago)
Author:
chronos
Message:
  • Added: Compile multiple action for compilation of code with mutliple compilers at once.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/UTheme.pas

    r122 r133  
    4141    property Theme: TTheme read FTheme write SetTheme;
    4242  end;
     43
     44const
     45  ThemeNameSystem = 'System';
     46  ThemeNameLight = 'Light';
     47  ThemeNameDark = 'Dark';
    4348
    4449procedure Register;
     
    105110  inherited;
    106111  Themes := TThemes.Create;
    107   with Themes.AddNew('System') do begin
     112  with Themes.AddNew(ThemeNameSystem) do begin
    108113    ColorWindow := clWindow;
    109114    ColorWindowText := clWindowText;
     
    113118  end;
    114119  Theme := TTheme(Themes.First);
    115   with Themes.AddNew('Dark') do begin
     120  with Themes.AddNew(ThemeNameDark) do begin
    116121    ColorWindow := RGBToColor($20, $20, $20);
    117122    ColorWindowText := clWhite;
     
    120125    ColorControlSelected := RGBToColor(96, 125, 155);
    121126  end;
    122   with Themes.AddNew('Light') do begin
     127  with Themes.AddNew(ThemeNameLight) do begin
    123128    ColorWindow := clWhite;
    124129    ColorWindowText := clBlack;
     
    175180procedure TThemeManager.UseTheme(Form: TForm);
    176181begin
    177   if not Used and (FTheme.Name = 'System') then Exit;
     182  if not Used and (FTheme.Name = ThemeNameSystem) then Exit;
    178183  ApplyTheme(Form);
    179184  Used := True;
Note: See TracChangeset for help on using the changeset viewer.