Changeset 15 for trunk/Forms/UFormSettings.pas
- Timestamp:
- Feb 27, 2018, 6:11:44 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormSettings.pas
r1 r15 20 20 CheckBoxAutomaticDPI: TCheckBox; 21 21 ComboBoxLanguage: TComboBox; 22 ComboBoxTheme: TComboBox; 22 23 Label1: TLabel; 24 Label2: TLabel; 23 25 LabelDPI: TLabel; 24 26 SpinEditDPI: TSpinEdit; … … 39 41 FormSettings: TFormSettings; 40 42 43 41 44 implementation 42 45 … … 44 47 45 48 uses 46 UCore ;49 UCore, UTheme; 47 50 48 51 { TFormSettings } … … 53 56 ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language); 54 57 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; 55 62 end; 56 63 … … 58 65 begin 59 66 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]); 61 70 end; 62 71 … … 74 83 begin 75 84 Core.CoolTranslator1.TranslateComponentRecursive(Self); 85 Core.ThemeManager1.UseTheme(Self); 76 86 end; 77 87
Note:
See TracChangeset
for help on using the changeset viewer.