Ignore:
Timestamp:
May 8, 2019, 12:11:40 PM (5 years ago)
Author:
chronos
Message:
  • Fixed: Build under Lazarus 2.0.
  • Modified: Used .lrj files instead of .lrt files.
  • Removed: TemplateGenerics package.
File:
1 edited

Legend:

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

    r15 r21  
    132132  I: Integer;
    133133begin
    134   for I := 0 to Component.ComponentCount - 1 do
    135     ApplyTheme(Component.Components[I]);
     134  if Component is TWinControl then begin
     135    for I := 0 to TWinControl(Component).ControlCount - 1 do
     136      ApplyTheme(TWinControl(Component).Controls[I]);
     137  end;
    136138
    137139  if Component is TControl then begin
     
    139141    if (Control is TEdit) or (Control is TSpinEdit) or (Control is TComboBox) and
    140142    (Control is TMemo) or (Control is TListView) or (Control is TCustomDrawGrid) or
    141     (Control is TCheckBox) then begin
     143    (Control is TCheckBox) or (Control is TPageControl) or (Control is TRadioButton) then begin
    142144      Control.Color := FTheme.ColorWindow;
    143145      Control.Font.Color := FTheme.ColorWindowText;
     
    150152      (Control as TCustomDrawGrid).Editor.Color := FTheme.ColorWindow;
    151153      (Control as TCustomDrawGrid).Editor.Font.Color := FTheme.ColorWindowText;
     154    end;
     155
     156    if Control is TPageControl then begin
     157      for I := 0 to TPageControl(Component).PageCount - 1 do
     158        ApplyTheme(TPageControl(Component).Pages[I]);
     159    end;
     160
     161    if Control is TCoolBar then begin
     162      (Control as TCoolBar).Themed := False;
    152163    end;
    153164  end;
Note: See TracChangeset for help on using the changeset viewer.