Ignore:
Timestamp:
Feb 27, 2018, 6:11:44 PM (7 years ago)
Author:
chronos
Message:
  • Added: Partial support for color theming.
  • Added: Allow to edit contact properties in the list of all.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormSettings.pas

    r1 r15  
    2020    CheckBoxAutomaticDPI: TCheckBox;
    2121    ComboBoxLanguage: TComboBox;
     22    ComboBoxTheme: TComboBox;
    2223    Label1: TLabel;
     24    Label2: TLabel;
    2325    LabelDPI: TLabel;
    2426    SpinEditDPI: TSpinEdit;
     
    3941  FormSettings: TFormSettings;
    4042
     43
    4144implementation
    4245
     
    4447
    4548uses
    46   UCore;
     49  UCore, UTheme;
    4750
    4851{ TFormSettings }
     
    5356  ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language);
    5457  if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
     58
     59  Core.ThemeManager1.Themes.LoadToStrings(ComboBoxTheme.Items);
     60  ComboBoxTheme.ItemIndex := ComboBoxTheme.Items.IndexOfObject(Core.ThemeManager1.Theme);
     61  if ComboBoxTheme.ItemIndex = -1 then ComboBoxTheme.ItemIndex := 0;
    5562end;
    5663
     
    5865begin
    5966  if ComboBoxLanguage.ItemIndex <> -1 then
    60     Core.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
     67    Core.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxTheme.ItemIndex]);
     68  if ComboBoxTheme.ItemIndex <> -1 then
     69    Core.ThemeManager1.Theme := TTheme(ComboBoxTheme.Items.Objects[ComboBoxTheme.ItemIndex]);
    6170end;
    6271
     
    7483begin
    7584  Core.CoolTranslator1.TranslateComponentRecursive(Self);
     85  Core.ThemeManager1.UseTheme(Self);
    7686end;
    7787
Note: See TracChangeset for help on using the changeset viewer.