Changeset 115 for trunk/Packages
- Timestamp:
- Feb 15, 2022, 3:46:22 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UTheme.pas
r69 r115 41 41 property Theme: TTheme read FTheme write SetTheme; 42 42 end; 43 44 const 45 ThemeNameSystem = 'System'; 46 ThemeNameLight = 'Light'; 47 ThemeNameDark = 'Dark'; 43 48 44 49 procedure Register; … … 105 110 inherited; 106 111 Themes := TThemes.Create; 107 with Themes.AddNew( 'System') do begin112 with Themes.AddNew(ThemeNameSystem) do begin 108 113 ColorWindow := clWindow; 109 114 ColorWindowText := clWindowText; … … 113 118 end; 114 119 Theme := TTheme(Themes.First); 115 with Themes.AddNew( 'Dark') do begin120 with Themes.AddNew(ThemeNameDark) do begin 116 121 ColorWindow := RGBToColor($20, $20, $20); 117 122 ColorWindowText := clWhite; … … 120 125 ColorControlSelected := RGBToColor(96, 125, 155); 121 126 end; 122 with Themes.AddNew( 'Light') do begin127 with Themes.AddNew(ThemeNameLight) do begin 123 128 ColorWindow := clWhite; 124 129 ColorWindowText := clBlack; … … 175 180 procedure TThemeManager.UseTheme(Form: TForm); 176 181 begin 177 if not Used and (FTheme.Name = 'System') then Exit;182 if not Used and (FTheme.Name = ThemeNameSystem) then Exit; 178 183 ApplyTheme(Form); 179 184 Used := True;
Note:
See TracChangeset
for help on using the changeset viewer.