Changeset 96 for trunk


Ignore:
Timestamp:
Aug 2, 2018, 10:41:11 AM (6 years ago)
Author:
chronos
Message:
  • Added: Theming support.
  • Modified: Items in Options dialog divided to two pages.
Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormAbout.lfm

    r74 r96  
    11object FormAbout: TFormAbout
    22  Left = 562
    3   Height = 397
     3  Height = 301
    44  Top = 277
    5   Width = 473
     5  Width = 515
    66  Caption = 'About'
    7   ClientHeight = 397
    8   ClientWidth = 473
     7  ClientHeight = 301
     8  ClientWidth = 515
     9  DesignTimePPI = 120
    910  OnCreate = FormCreate
    1011  OnShow = FormShow
    1112  Position = poScreenCenter
    12   LCLVersion = '1.6.0.4'
     13  LCLVersion = '1.8.2.0'
    1314  object LabelDescription: TLabel
    1415    Left = 20
    15     Height = 24
    16     Top = 108
    17     Width = 433
     16    Height = 1
     17    Top = 132
     18    Width = 475
    1819    Align = alTop
    1920    BorderSpacing.Around = 20
    20     Caption = 'Simple BrainFuck IDE written in Lazarus/FPC.'
    2121    ParentColor = False
    2222    WordWrap = True
    2323  end
    2424  object ButtonClose: TButton
    25     Left = 360
     25    Left = 402
    2626    Height = 25
    27     Top = 357
     27    Top = 261
    2828    Width = 93
    2929    Anchors = [akRight, akBottom]
     
    3434  object LabelContent: TLabel
    3535    Left = 20
    36     Height = 24
    37     Top = 152
    38     Width = 433
     36    Height = 20
     37    Top = 153
     38    Width = 475
    3939    Align = alTop
    4040    BorderSpacing.Around = 20
     
    4545    Left = 16
    4646    Height = 25
    47     Top = 357
     47    Top = 261
    4848    Width = 176
    4949    Anchors = [akLeft, akBottom]
     
    5454  object Panel1: TPanel
    5555    Left = 0
    56     Height = 88
     56    Height = 112
    5757    Top = 0
    58     Width = 473
     58    Width = 515
    5959    Align = alTop
    6060    BevelOuter = bvNone
    61     ClientHeight = 88
    62     ClientWidth = 473
     61    ClientHeight = 112
     62    ClientWidth = 515
    6363    TabOrder = 2
    6464    object Image1: TImage
     
    6767      Top = 16
    6868      Width = 69
    69       Picture.Data = {
    70         1754506F727461626C654E6574776F726B477261706869638907000089504E47
    71         0D0A1A0A0000000D49484452000000400000004008030000009DB781EC000002
    72         D6504C54450000000000000E0E0E2525252A2A2A4343430000000A0A0A131313
    73         1414141919190000000101010505050808080B0B0B1212121313131515152525
    74         252727272D2D2D3838383F3F3F4444444747474848482323232424242929292B
    75         2B2B3232323838383B3B3B3C3C3C4040404343434444444C4C4C000000010000
    76         0100010101010200020201000301000300030202020303030402000502000500
    77         0506020007030006000607000708000909000A04040405050509040006060607
    78         07070808080909090A04000C05000A000B0B000C0E000F0F0010130800140800
    79         16090011001212001316001817001919001B0B0B0B0C0C0C0D0D0D0E0E0E1010
    80         101313131616161A1A1A210D00230E00230026240F00250F00260F002710002A
    81         11002C12002D12003214003315003415003515003F19003400384B00501F1F1F
    82         2121212727272828282A2A2A2B2B2B4C1F004E20004F20005121005422005522
    83         005824005924005C25002E2E2E3737373A3A3A4545454646464747474B4B4B4C
    84         4C4C4F4F4F5E00655F00666100685E26007B32007C32007E3300813500843600
    85         69007071007973007B76007E79008183008B8536008B39008C39008D39008F3A
    86         00903B00913B00933C00953D00963D00A54300A64300A74400A9450087009088
    87         00919A00A4A700B2A800B3AE00B9B84B00B94B00BB4C00BE4D00BF4E00AF00BA
    88         B700C3B800C4BC00C8BE00CBBF00CCC100CEC200CFC800D5C900D6E100F0E300
    89         F2E400F3E700F7E800F8E900F9EB00FBEC00FCED00FDEE00FE5454545B5B5B61
    90         61616B6B6B6C6C6C5656565F5F5F5555555A5A5A717171717171CC5300CF5400
    91         D15500D35600D75700E35C00E55D00E65D00E85E00E95F00EA5F00EB5F00ED60
    92         00F16200F26200F46300F56300F66400F76400F96500FA6500FB6600FC6600FD
    93         6700FE67007676767B7B7B8484848A8A8A8F8F8F9696969F9F9F9C9C9CA8A8A8
    94         B5B5B5A3A3A3A4A4A4A6A6A6C1C1C1C9C9C9CCCCCCD5D5D5BFBFBFA8559EA500
    95         0000F274524E53003F3F3F3F3F7F7F7F7F7FBFBFBFBFBFBFBFBF7F7F7F7F7F7F
    96         7F7FBFBFBFBFBFBFBFBFBFBFBFBFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    97         FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    98         FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    99         FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    100         FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    101         FFFFFF7F7F7F7F7FBFBFFFFF7FBFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
    102         FFFFFFFFFFFFFF3F7F7F7F3F3F3F7F3F3F7F7F7F3F3F3F3F7F9B001E6E000003
    103         7049444154789CCDD7F75BD3401807F0D41107EE857B82AF04B1540B282E1470
    104         E146C4BD702B225551C4858A7BEFBDF7DEA3716F11170E10C538C08DE87FE0A5
    105         A1A5B9DCB5D7DF7C7F808727F97E9EF7DEBBA494E3FEE3BACBF31EB7672524CC
    106         BCE3C9F345BEBA982ECCF706410FA804410001FD8EA8E7CE1E2FDACB9251972F
    107         40191D53BC72B8AF266D2D37E744CE683D350EA0877B4EF2BA080771CB4AEA3B
    108         CC7BD2BBB756600907797747EDDBAA2C359F1DA41D3EA1845B34A014531E0957
    109         2803645A804520EFE638C606D06E9623E50B31E79150900078B2E701482D8C01
    110         582949529C93E83C74CF22006DFE1BC8C08B4731003EF3930CE8A7A98536DE66
    111         726C722A02F4C53540310BB04EBECB2F2D1D658D294F92DAABE31D163C7D6C84
    112         3572073334404D1C303C90A457EB23F3E37D36BC92A4E4C60A00593820E4010D
    113         060D1E9AFE66D8E0410D0CB17BDF49195BA29478D4D60C2973BFC9080A20F058
    114         FE1EE4017E6992A5E426A0FFAAE7D233A37CC998223D5F35C042291DE0403C11
    115         18B8F6050246984CA6A814E9E5A621764002068015B0CD000C13F7654A6FB70D
    116         6F780079AB876E464B3838A9B115E88101D11AC070FFBDF47A633F000500885C
    117         8F86F8D09007E027E19A5EBB8DA90B3B52B7517B947AE6034AF9C4B5251CA429
    118         3E34603A0E508B0CE4D8CD8009688D016ECA0C5293273889C7589E0510E2D5F9
    119         DA82D201F3D3889D441D43E758A9DF8B255DCE8F571F0217DE664A0945550BE8
    120         E67203827A07B00FB41DE221AFE5A2289ACF9F5E1280FE5E262A752EC096AF66
    121         9FAF88F356403676372102AAD749854022702CAC53DF1597CD7364E064583B54
    122         A1B6BC87FA104C1548C0D146005EBBC4C3DE0838DE487D07760AB9AA35043200
    123         73C5334D117022340495BFF5860238C0713C0518653EDFC53683ED79D7AB6BF3
    124         DC342A70A1AB06C82600941940A27836189F4169429E8B0E24025E3BC5239A21
    125         5E2501B941DA6D0C0DE9BCF8A239116C430CF696AFE22F02A5B29A6B00A5F6F8
    126         E71FA44B23E5AB7588C0073D01305F38B5B419E0C06F22C05D07C68A20E739AE
    127         1523508B0630E6351FAAD6FAC4BA84F214A0126B073728C00FD6B7DA2FDA0CC6
    128         32023F694021C6257CA4019CAEAE652705C2D71DFB72F2D5E9CFDFCF55F87047
    129         066D1BED2BB7BB837FBB5900EE8B830E66B3008E8E25F969760180EF2C404B7A
    130         5E7F9305984907045F1680A703EA7DF807F2279CD37B7E68DE0000000049454E
    131         44AE426082
    132       }
    13369    end
    13470    object LabelAppName: TLabel
    13571      Left = 104
    136       Height = 55
     72      Height = 92
    13773      Top = 16
    138       Width = 148
     74      Width = 388
    13975      Align = alCustom
     76      Anchors = [akTop, akLeft, akRight, akBottom]
     77      AutoSize = False
    14078      BorderSpacing.Around = 20
    141       Caption = 'LazFuck'
    142       Font.Height = -40
     79      Font.Height = -50
    14380      ParentColor = False
    14481      ParentFont = False
    145       WordWrap = True
    14682    end
    14783  end
  • trunk/Forms/UFormAbout.pas

    r74 r96  
    5656  if Assigned(ApplicationInfo) then begin
    5757    LabelAppName.Caption := ApplicationInfo.AppName;
     58    LabelAppName.AutoSize := True;
     59    LabelAppName.Font.Size := 30;
     60    LabelDescription.Caption := ApplicationInfo.Description;
    5861    LabelContent.Caption := SVersion + ': ' + ApplicationInfo.Version + LineEnding +
    5962      SReleaseDate + ': ' + DateToStr(ApplicationInfo.ReleaseDate) + LineEnding +
    6063      SLicense + ': ' + ApplicationInfo.License;
     64    Image1.Picture.Bitmap.Assign(Application.Icon);
    6165  end;
    6266end;
     
    7074procedure TFormAbout.FormCreate(Sender: TObject);
    7175begin
     76  Core.ThemeManager.UseTheme(Self);
    7277  ApplicationInfo := nil;
    7378  CoolTranslator := nil;
  • trunk/Forms/UFormLog.lfm

    r60 r96  
    77  ClientHeight = 500
    88  ClientWidth = 800
    9   LCLVersion = '1.3'
     9  DesignTimePPI = 120
     10  OnCreate = FormCreate
     11  LCLVersion = '1.8.2.0'
    1012  object Memo1: TMemo
    1113    Left = 0
  • trunk/Forms/UFormLog.pas

    r60 r96  
    1414  TFormLog = class(TForm)
    1515    Memo1: TMemo;
     16    procedure FormCreate(Sender: TObject);
    1617  private
    1718    { private declarations }
     
    2728{$R *.lfm}
    2829
     30uses
     31  UCore;
     32
     33{ TFormLog }
     34
     35procedure TFormLog.FormCreate(Sender: TObject);
     36begin
     37  Core.CoolTranslator1.TranslateComponentRecursive(Self);
     38  Core.ThemeManager.UseTheme(Self);
     39end;
     40
    2941end.
    3042
  • trunk/Forms/UFormMain.pas

    r93 r96  
    202202    DockInit;
    203203    Core.PersistentForm1.Load(Self, True);
     204    Core.ThemeManager.UseTheme(Self)
    204205  end;
    205206end;
     
    435436procedure TFormMain.AViewCompilersExecute(Sender: TObject);
    436437begin
     438  if not Assigned(FormTargets) then FormTargets := TFormTargets.Create(Self);
    437439  FormTargets.Show;
    438440end;
     
    445447procedure TFormMain.AViewLogExecute(Sender: TObject);
    446448begin
     449  if not Assigned(FormLog) then FormLog := TFormLog.Create(Self);
    447450  FormLog.Show;
    448451end;
     
    480483        end;
    481484      end;
     485      Core.ThemeManager.UseTheme(Self);
    482486    end;
    483487  finally
  • trunk/Forms/UFormOptions.lfm

    r91 r96  
    11object FormOptions: TFormOptions
    2   Left = 510
    3   Height = 418
    4   Top = 324
    5   Width = 511
     2  Left = 401
     3  Height = 356
     4  Top = 236
     5  Width = 607
    66  Caption = 'Options'
    7   ClientHeight = 418
    8   ClientWidth = 511
     7  ClientHeight = 356
     8  ClientWidth = 607
    99  DesignTimePPI = 120
    1010  OnClose = FormClose
     
    1313  LCLVersion = '1.8.2.0'
    1414  object ButtonOk: TButton
    15     Left = 422
     15    Left = 526
    1616    Height = 25
    17     Top = 386
     17    Top = 324
    1818    Width = 75
    1919    Anchors = [akRight, akBottom]
    2020    Caption = 'Ok'
    2121    ModalResult = 1
    22     OnClick = ButtonOkClick
    2322    TabOrder = 0
    2423  end
    2524  object ButtonCancel: TButton
    26     Left = 334
     25    Left = 430
    2726    Height = 25
    28     Top = 386
     27    Top = 324
    2928    Width = 75
    3029    Anchors = [akRight, akBottom]
     
    3332    TabOrder = 1
    3433  end
    35   object SpinEditCellSize: TSpinEdit
    36     Left = 165
    37     Height = 28
    38     Top = 40
    39     Width = 130
    40     MaxValue = 2000000000
     34  object PageControl1: TPageControl
     35    Left = 8
     36    Height = 310
     37    Top = 8
     38    Width = 593
     39    ActivePage = TabSheetBuild
     40    Anchors = [akTop, akLeft, akRight, akBottom]
     41    TabIndex = 1
    4142    TabOrder = 2
    42   end
    43   object SpinEditMemorySize: TSpinEdit
    44     Left = 165
    45     Height = 28
    46     Top = 6
    47     Width = 130
    48     MaxValue = 2000000000
    49     TabOrder = 3
    50   end
    51   object Label1: TLabel
    52     Left = 8
    53     Height = 20
    54     Top = 8
    55     Width = 87
    56     Caption = 'Memory size:'
    57     ParentColor = False
    58   end
    59   object Label2: TLabel
    60     Left = 8
    61     Height = 20
    62     Top = 40
    63     Width = 57
    64     Caption = 'Cell size:'
    65     ParentColor = False
    66   end
    67   object Label3: TLabel
    68     Left = 8
    69     Height = 20
    70     Top = 95
    71     Width = 127
    72     Caption = 'Interface language:'
    73     ParentColor = False
    74   end
    75   object CheckBox1: TCheckBox
    76     Left = 8
    77     Height = 27
    78     Top = 128
    79     Width = 499
    80     Anchors = [akTop, akLeft, akRight]
    81     AutoSize = False
    82     Caption = 'Reopend last opened project'
    83     TabOrder = 4
    84   end
    85   object SpinEditDPIX: TSpinEdit
    86     Left = 104
    87     Height = 28
    88     Top = 193
    89     Width = 80
    90     MaxValue = 1000
    91     MinValue = 1
    92     TabOrder = 5
    93     Value = 1
    94   end
    95   object LabelDPI: TLabel
    96     Left = 24
    97     Height = 20
    98     Top = 201
    99     Width = 26
    100     Caption = 'DPI:'
    101     ParentColor = False
    102   end
    103   object SpinEditDPIY: TSpinEdit
    104     Left = 208
    105     Height = 28
    106     Top = 193
    107     Width = 80
    108     MaxValue = 1000
    109     MinValue = 1
    110     TabOrder = 6
    111     Value = 1
    112   end
    113   object LabelX: TLabel
    114     Left = 192
    115     Height = 20
    116     Top = 201
    117     Width = 7
    118     Caption = 'x'
    119     ParentColor = False
    120   end
    121   object CheckBoxDPIAuto: TCheckBox
    122     Left = 8
    123     Height = 27
    124     Top = 168
    125     Width = 491
    126     Anchors = [akTop, akLeft, akRight]
    127     AutoSize = False
    128     Caption = 'Automatic DPI'
    129     OnChange = CheckBoxDPIAutoChange
    130     TabOrder = 7
    131   end
    132   object Label4: TLabel
    133     Left = 16
    134     Height = 20
    135     Top = 248
    136     Width = 159
    137     Caption = 'Compiler optimizations:'
    138     ParentColor = False
    139   end
    140   object ComboBoxLanguage: TComboBox
    141     Left = 248
    142     Height = 28
    143     Top = 83
    144     Width = 188
    145     ItemHeight = 20
    146     Style = csDropDownList
    147     TabOrder = 8
    148   end
    149   object CheckBoxOptimizeAddSub: TCheckBox
    150     Left = 39
    151     Height = 24
    152     Top = 280
    153     Width = 189
    154     Caption = 'Addition and subtraction'
    155     TabOrder = 9
    156   end
    157   object CheckBoxOptimizeMerge: TCheckBox
    158     Left = 39
    159     Height = 24
    160     Top = 304
    161     Width = 181
    162     Caption = 'Merge same operations'
    163     TabOrder = 10
    164   end
    165   object CheckBoxOptimizeRelativeIndexes: TCheckBox
    166     Left = 39
    167     Height = 24
    168     Top = 328
    169     Width = 131
    170     Caption = 'Relative indexes'
    171     TabOrder = 11
    172   end
    173   object CheckBoxOptimizeCopyMultiply: TCheckBox
    174     Left = 39
    175     Height = 24
    176     Top = 352
    177     Width = 116
    178     Caption = 'Copy multiply'
    179     TabOrder = 12
    180   end
    181   object ComboBoxOptimization: TComboBox
    182     Left = 256
    183     Height = 28
    184     Top = 248
    185     Width = 188
    186     ItemHeight = 20
    187     Items.Strings = (
    188       'None'
    189       'Normal'
    190     )
    191     OnSelect = CheckBoxDPIAutoChange
    192     Style = csDropDownList
    193     TabOrder = 13
     43    object TabSheetGeneral: TTabSheet
     44      Caption = 'General'
     45      ClientHeight = 277
     46      ClientWidth = 585
     47      object Panel1: TPanel
     48        Left = 0
     49        Height = 277
     50        Top = 0
     51        Width = 585
     52        Align = alClient
     53        BevelOuter = bvNone
     54        ClientHeight = 277
     55        ClientWidth = 585
     56        TabOrder = 0
     57        object Label3: TLabel
     58          Left = 8
     59          Height = 20
     60          Top = 48
     61          Width = 127
     62          Caption = 'Interface language:'
     63          ParentColor = False
     64        end
     65        object ComboBoxLanguage: TComboBox
     66          Left = 256
     67          Height = 28
     68          Top = 48
     69          Width = 188
     70          ItemHeight = 20
     71          Style = csDropDownList
     72          TabOrder = 0
     73        end
     74        object CheckBox1: TCheckBox
     75          Left = 8
     76          Height = 27
     77          Top = 85
     78          Width = 1051
     79          Anchors = [akTop, akLeft, akRight]
     80          AutoSize = False
     81          Caption = 'Reopend last opened project'
     82          TabOrder = 1
     83        end
     84        object CheckBoxDPIAuto: TCheckBox
     85          Left = 8
     86          Height = 27
     87          Top = 125
     88          Width = 1043
     89          Anchors = [akTop, akLeft, akRight]
     90          AutoSize = False
     91          Caption = 'Automatic DPI'
     92          OnChange = CheckBoxDPIAutoChange
     93          TabOrder = 2
     94        end
     95        object LabelDPI: TLabel
     96          Left = 30
     97          Height = 20
     98          Top = 160
     99          Width = 26
     100          Caption = 'DPI:'
     101          ParentColor = False
     102        end
     103        object SpinEditDPIX: TSpinEdit
     104          Left = 112
     105          Height = 28
     106          Top = 158
     107          Width = 80
     108          MaxValue = 1000
     109          MinValue = 1
     110          TabOrder = 3
     111          Value = 1
     112        end
     113        object SpinEditDPIY: TSpinEdit
     114          Left = 216
     115          Height = 28
     116          Top = 160
     117          Width = 80
     118          MaxValue = 1000
     119          MinValue = 1
     120          TabOrder = 4
     121          Value = 1
     122        end
     123        object LabelX: TLabel
     124          Left = 200
     125          Height = 20
     126          Top = 160
     127          Width = 7
     128          Caption = 'x'
     129          ParentColor = False
     130        end
     131        object LabelTheme: TLabel
     132          Left = 8
     133          Height = 20
     134          Top = 16
     135          Width = 48
     136          Caption = 'Theme:'
     137          ParentColor = False
     138        end
     139        object ComboBoxTheme: TComboBox
     140          Left = 256
     141          Height = 28
     142          Top = 8
     143          Width = 188
     144          ItemHeight = 20
     145          Style = csDropDownList
     146          TabOrder = 5
     147        end
     148      end
     149    end
     150    object TabSheetBuild: TTabSheet
     151      Caption = 'Build'
     152      ClientHeight = 277
     153      ClientWidth = 585
     154      object Panel2: TPanel
     155        Left = 0
     156        Height = 277
     157        Top = 0
     158        Width = 585
     159        Align = alClient
     160        BevelOuter = bvNone
     161        ClientHeight = 277
     162        ClientWidth = 585
     163        TabOrder = 0
     164        object Label4: TLabel
     165          Left = 8
     166          Height = 20
     167          Top = 104
     168          Width = 159
     169          Caption = 'Compiler optimizations:'
     170          ParentColor = False
     171        end
     172        object ComboBoxOptimization: TComboBox
     173          Left = 248
     174          Height = 28
     175          Top = 104
     176          Width = 188
     177          ItemHeight = 20
     178          Items.Strings = (
     179            'None'
     180            'Normal'
     181          )
     182          OnSelect = CheckBoxDPIAutoChange
     183          Style = csDropDownList
     184          TabOrder = 0
     185        end
     186        object CheckBoxOptimizeAddSub: TCheckBox
     187          Left = 31
     188          Height = 24
     189          Top = 136
     190          Width = 189
     191          Caption = 'Addition and subtraction'
     192          TabOrder = 1
     193        end
     194        object CheckBoxOptimizeMerge: TCheckBox
     195          Left = 31
     196          Height = 24
     197          Top = 160
     198          Width = 181
     199          Caption = 'Merge same operations'
     200          TabOrder = 2
     201        end
     202        object CheckBoxOptimizeCopyMultiply: TCheckBox
     203          Left = 31
     204          Height = 24
     205          Top = 208
     206          Width = 116
     207          Caption = 'Copy multiply'
     208          TabOrder = 3
     209        end
     210        object CheckBoxOptimizeRelativeIndexes: TCheckBox
     211          Left = 31
     212          Height = 24
     213          Top = 184
     214          Width = 131
     215          Caption = 'Relative indexes'
     216          TabOrder = 4
     217        end
     218        object Label2: TLabel
     219          Left = 8
     220          Height = 20
     221          Top = 40
     222          Width = 57
     223          Caption = 'Cell size:'
     224          ParentColor = False
     225        end
     226        object Label1: TLabel
     227          Left = 8
     228          Height = 20
     229          Top = 8
     230          Width = 87
     231          Caption = 'Memory size:'
     232          ParentColor = False
     233        end
     234        object SpinEditMemorySize: TSpinEdit
     235          Left = 165
     236          Height = 28
     237          Top = 6
     238          Width = 130
     239          MaxValue = 2000000000
     240          TabOrder = 5
     241        end
     242        object SpinEditCellSize: TSpinEdit
     243          Left = 165
     244          Height = 28
     245          Top = 40
     246          Width = 130
     247          MaxValue = 2000000000
     248          TabOrder = 6
     249        end
     250      end
     251    end
    194252  end
    195253end
  • trunk/Forms/UFormOptions.pas

    r91 r96  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   Spin, UTarget;
     9  Spin, ComCtrls, ExtCtrls, UTarget, UTheme;
    1010
    1111type
     
    1717    ButtonCancel: TButton;
    1818    CheckBox1: TCheckBox;
     19    CheckBoxDPIAuto: TCheckBox;
    1920    CheckBoxOptimizeAddSub: TCheckBox;
    20     CheckBoxDPIAuto: TCheckBox;
     21    CheckBoxOptimizeCopyMultiply: TCheckBox;
    2122    CheckBoxOptimizeMerge: TCheckBox;
    2223    CheckBoxOptimizeRelativeIndexes: TCheckBox;
    23     CheckBoxOptimizeCopyMultiply: TCheckBox;
    2424    ComboBoxLanguage: TComboBox;
    2525    ComboBoxOptimization: TComboBox;
     26    ComboBoxTheme: TComboBox;
    2627    Label1: TLabel;
    2728    Label2: TLabel;
     
    2930    Label4: TLabel;
    3031    LabelDPI: TLabel;
     32    LabelTheme: TLabel;
    3133    LabelX: TLabel;
     34    PageControl1: TPageControl;
     35    Panel1: TPanel;
     36    Panel2: TPanel;
     37    SpinEditCellSize: TSpinEdit;
    3238    SpinEditDPIX: TSpinEdit;
    3339    SpinEditDPIY: TSpinEdit;
    34     SpinEditCellSize: TSpinEdit;
    3540    SpinEditMemorySize: TSpinEdit;
    36     procedure ButtonOkClick(Sender: TObject);
     41    TabSheetGeneral: TTabSheet;
     42    TabSheetBuild: TTabSheet;
    3743    procedure CheckBoxDPIAutoChange(Sender: TObject);
    3844    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
     
    6268begin
    6369  Core.PersistentForm1.Load(Self);
    64 
    65   Core.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items);
    66   ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language);
    67   if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
    68   CheckBox1.Checked := Core.OpenProjectOnStart;
    6970end;
    7071
     
    8788procedure TFormOptions.Load;
    8889begin
     90  ComboBoxLanguage.ItemIndex := ComboBoxLanguage.Items.IndexOfObject(Core.CoolTranslator1.Language);
     91  if ComboBoxLanguage.ItemIndex = -1 then ComboBoxLanguage.ItemIndex := 0;
     92  ComboBoxTheme.ItemIndex := ComboBoxTheme.Items.IndexOfObject(Core.ThemeManager.Theme);
     93  if ComboBoxTheme.ItemIndex = -1 then ComboBoxTheme.ItemIndex := 0;
     94  CheckBox1.Checked := Core.OpenProjectOnStart;
    8995  CheckBoxOptimizeAddSub.Checked := Core.Optimizations.AddSub;
    9096  CheckBoxOptimizeMerge.Checked := Core.Optimizations.Merge;
     
    102108procedure TFormOptions.Save;
    103109begin
     110  if ComboBoxLanguage.ItemIndex <> -1 then
     111    Core.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
     112  if ComboBoxTheme.ItemIndex <> -1 then
     113    Core.ThemeManager.Theme := TTheme(ComboBoxTheme.Items.Objects[ComboBoxTheme.ItemIndex]);
     114  Core.OpenProjectOnStart := CheckBox1.Checked;
    104115  Core.ScaleDPI1.DPI := Point(SpinEditDPIX.Value, SpinEditDPIY.Value);
    105116  Core.ScaleDPI1.AutoDetect := CheckBoxDPIAuto.Checked;
     
    111122  Core.Optimizations.RelativeIndexes := CheckBoxOptimizeRelativeIndexes.Checked;
    112123  Core.Optimizations.CopyMultiply := CheckBoxOptimizeCopyMultiply.Checked;
    113 end;
    114 
    115 procedure TFormOptions.ButtonOkClick(Sender: TObject);
    116 begin
    117   if ComboBoxLanguage.ItemIndex <> -1 then
    118     Core.CoolTranslator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
    119   Core.OpenProjectOnStart := CheckBox1.Checked;
    120124end;
    121125
     
    134138begin
    135139  Core.CoolTranslator1.TranslateComponentRecursive(Self);
     140  Core.ThemeManager.UseTheme(Self);
     141  Core.ThemeManager.Themes.LoadToStrings(ComboBoxTheme.Items);
     142  Core.CoolTranslator1.LanguageListToStrings(ComboBoxLanguage.Items);
    136143end;
    137144
  • trunk/Forms/UFormTargetOptions.pas

    r92 r96  
    6969begin
    7070  Core.CoolTranslator1.TranslateComponentRecursive(Self);
     71  Core.ThemeManager.UseTheme(Self);
    7172end;
    7273
  • trunk/Forms/UFormTargets.lfm

    r92 r96  
    88  ClientWidth = 574
    99  DesignTimePPI = 120
     10  OnCreate = FormCreate
    1011  OnShow = FormShow
    1112  LCLVersion = '1.8.2.0'
  • trunk/Forms/UFormTargets.pas

    r92 r96  
    1414  TFormTargets = class(TForm)
    1515    ListView1: TListView;
     16    procedure FormCreate(Sender: TObject);
    1617    procedure FormShow(Sender: TObject);
    1718    procedure ListView1Data(Sender: TObject; Item: TListItem);
     
    3940begin
    4041  ReloadList;
     42end;
     43
     44procedure TFormTargets.FormCreate(Sender: TObject);
     45begin
     46  Core.CoolTranslator1.TranslateComponentRecursive(Self);
     47  Core.ThemeManager.UseTheme(Self);
    4148end;
    4249
  • trunk/Languages/LazFuck.cs.po

    r92 r96  
    2626msgstr "O programu"
    2727
    28 #: tformabout.labelappname.caption
    29 msgctxt "tformabout.labelappname.caption"
    30 msgid "LazFuck"
    31 msgstr "LazFuck"
    32 
    3328#: tformabout.labelcontent.caption
    3429msgctxt "tformabout.labelcontent.caption"
    3530msgid "   "
    3631msgstr "   "
    37 
    38 #: tformabout.labeldescription.caption
    39 msgid "Simple BrainFuck IDE written in Lazarus/FPC."
    40 msgstr "Jednoduché BrainFuck IDE napsané v Lazarus/FPC."
    4132
    4233#: tformcompilers.caption
     
    399390msgstr "DPI:"
    400391
     392#: tformoptions.labeltheme.caption
     393msgid "Theme:"
     394msgstr "Téma:"
     395
    401396#: tformoptions.labelx.caption
    402397msgctxt "tformoptions.labelx.caption"
     
    404399msgstr "x"
    405400
     401#: tformoptions.tabsheetbuild.caption
     402msgid "Build"
     403msgstr "Sestavení"
     404
     405#: tformoptions.tabsheetgeneral.caption
     406msgid "General"
     407msgstr "Obecné"
     408
    406409#: tformoutput.caption
    407410msgid "Output"
  • trunk/Languages/LazFuck.po

    r92 r96  
    1616msgstr ""
    1717
    18 #: tformabout.labelappname.caption
    19 msgctxt "tformabout.labelappname.caption"
    20 msgid "LazFuck"
    21 msgstr ""
    22 
    2318#: tformabout.labelcontent.caption
    2419msgctxt "tformabout.labelcontent.caption"
     
    2621msgstr ""
    2722
    28 #: tformabout.labeldescription.caption
    29 msgid "Simple BrainFuck IDE written in Lazarus/FPC."
    30 msgstr ""
    31 
    3223#: tformcompilers.caption
    3324msgctxt "TFORMCOMPILERS.CAPTION"
     
    355346msgstr ""
    356347
     348#: tformoptions.labeltheme.caption
     349msgid "Theme:"
     350msgstr ""
     351
    357352#: tformoptions.labelx.caption
    358353msgctxt "tformoptions.labelx.caption"
     
    360355msgstr ""
    361356
     357#: tformoptions.tabsheetbuild.caption
     358msgid "Build"
     359msgstr ""
     360
     361#: tformoptions.tabsheetgeneral.caption
     362msgid "General"
     363msgstr ""
     364
    362365#: tformoutput.caption
    363366msgid "Output"
  • trunk/LazFuck.lpr

    r92 r96  
    4242  Application.CreateForm(TFormSourceCode, FormSourceCode);
    4343  Application.CreateForm(TFormTargetCode, FormTargetCode);
    44   Application.CreateForm(TFormLog, FormLog);
    45   Application.CreateForm(TFormTargets, FormTargets);
    4644  Application.Run;
    4745end.
  • trunk/Target/UTargetInterpretter.pas

    r91 r96  
    302302  for I := 0 to Length(FProgram) - 1 do begin
    303303    Result := Result + BrainFuckCommandText[FProgram[I].Command];
    304     //if FProgram[I].Command in [cmInc, cmDec, cmPointerInc, cmPointerDec,
    305     //cmSet, cmMultipy] then begin
    306     if FProgram[I].Parameter > 1 then
    307       Result := Result + IntToStr(FProgram[I].Parameter);
    308     if FProgram[I].RelIndex > 1 then
     304    if FProgram[I].Command in [cmInc, cmDec, cmPointerInc, cmPointerDec,
     305      cmSet, cmMultipy] then begin
     306      if FProgram[I].Parameter <> 1 then
     307        Result := Result + IntToStr(FProgram[I].Parameter);
     308    end;
     309    if FProgram[I].RelIndex <> 0 then
    309310      Result := Result + 'R' + IntToStr(FProgram[I].RelIndex);
    310     //end;
    311311  end;
    312312end;
  • trunk/Target/UTargetJava.pas

    r87 r96  
    66
    77uses
    8   Classes, SysUtils, FileUtil, UTarget, UBFTarget, Process, Dialogs;
     8  Classes, SysUtils, FileUtil, UTarget, UBFTarget, Dialogs;
    99
    1010type
  • trunk/UBFTarget.pas

    r91 r96  
    1212  TMachineCommand = (cmNoOperation, cmInc, cmDec, cmPointerInc, cmPointerDec,
    1313    cmOutput, cmInput, cmLoopStart, cmLoopEnd, cmDebug, cmSet, cmMultipy);
     14
     15  { TMachineOperation }
    1416
    1517  TMachineOperation = record
     
    1719    Parameter: Integer;
    1820    RelIndex: Integer;
     21    function Create(Command: TMachineCommand; Parameter, RelIndex: Integer): TMachineOperation;
    1922  end;
    2023
     
    5558implementation
    5659
     60{ TMachineOperation }
     61
     62function TMachineOperation.Create(Command: TMachineCommand; Parameter,
     63  RelIndex: Integer): TMachineOperation;
     64begin
     65  Result.Command := Command;
     66  Result.Parameter := Parameter;
     67  Result.RelIndex := RelIndex;
     68end;
     69
    5770function TBFTarget.CheckClear: Boolean;
    5871begin
     
    108121        NewProgram[NewProgramIndex].Parameter := CheckOccurenceSumParam(cmDec);
    109122      end;
    110       else begin
    111         NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    112         NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    113       end;
     123      else NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    114124    end;
    115125    DebugSteps.UpdateTargetPos(FProgramIndex, NewProgramIndex);
     
    234244          NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    235245        end else begin
    236           NewProgram[NewProgramIndex].Command := cmSet;
    237           NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
     246          NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    238247        end;
    239248      end;
    240249      cmLoopStart: begin
    241250        if CheckClear then begin
    242           NewProgram[NewProgramIndex].Command := cmSet;
    243           NewProgram[NewProgramIndex].Parameter := 0;
     251          NewProgram[NewProgramIndex] := TMachineOperation.Create(cmSet, 0, 0);
    244252          Inc(FProgramIndex, 2);
    245253        end else begin
    246           NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    247           NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    248         end;
    249       end;
    250       else begin
    251         NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    252         NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    253       end;
     254          NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
     255        end;
     256      end;
     257      else NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    254258    end;
    255259    PreviousCommand := FProgram[FProgramIndex].Command;
     
    294298      end;
    295299      cmInc, cmDec, cmInput, cmOutput, cmSet: begin
    296         NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    297         NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    298         NewProgram[NewProgramIndex].RelIndex := RelIndex;
     300        NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
     301        NewProgram[NewProgramIndex].RelIndex :=
     302          NewProgram[NewProgramIndex].RelIndex + RelIndex;
    299303      end;
    300304      cmLoopStart, cmLoopEnd: begin
    301305        if RelIndex > 0 then begin
    302           NewProgram[NewProgramIndex].Command := cmPointerInc;
    303           NewProgram[NewProgramIndex].Parameter := RelIndex;
    304           NewProgram[NewProgramIndex].RelIndex := 0;
     306          NewProgram[NewProgramIndex] := TMachineOperation.Create(cmPointerInc,
     307            RelIndex, 0);
    305308          Inc(NewProgramIndex);
    306309          RelIndex := 0;
    307310        end else
    308311        if RelIndex < 0 then begin
    309           NewProgram[NewProgramIndex].Command := cmPointerDec;
    310           NewProgram[NewProgramIndex].Parameter := Abs(RelIndex);
    311           NewProgram[NewProgramIndex].RelIndex := 0;
     312          NewProgram[NewProgramIndex] := TMachineOperation.Create(cmPointerDec,
     313            Abs(RelIndex), 0);
    312314          Inc(NewProgramIndex);
    313315          RelIndex := 0;
    314316        end;
    315         NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    316         NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    317         NewProgram[NewProgramIndex].RelIndex := 0;
    318       end;
     317        NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
     318      end;
     319      else raise Exception.Create(Format('Unsupported command %d', [FProgram[FProgramIndex].Command]));
    319320    end;
    320321    DebugSteps.UpdateTargetPos(FProgramIndex, NewProgramIndex);
     
    351352      cmPointerInc: begin
    352353        PointerChange := PointerChange + FProgram[FProgramIndex].Parameter;
    353         NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    354         NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    355         NewProgram[NewProgramIndex].RelIndex := FProgram[FProgramIndex].RelIndex;
     354        NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    356355      end;
    357356      cmPointerDec: begin
    358357        PointerChange := PointerChange - FProgram[FProgramIndex].Parameter;
    359         NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    360         NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    361         NewProgram[NewProgramIndex].RelIndex := FProgram[FProgramIndex].RelIndex;
     358        NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    362359      end;
    363360      cmInc: begin
    364361        if not ProcessLoop then begin
    365           NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    366           NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    367           NewProgram[NewProgramIndex].RelIndex := FProgram[FProgramIndex].RelIndex;
     362          NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    368363        end else begin
    369364          if ((FProgram[FProgramIndex].RelIndex + PointerChange) <> 0) then begin
     365            NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    370366            NewProgram[NewProgramIndex].Command := cmMultipy;
    371             NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    372             NewProgram[NewProgramIndex].RelIndex := FProgram[FProgramIndex].RelIndex;
    373367          end else Dec(NewProgramIndex);
    374368        end;
     
    379373            (FProgram[FProgramIndex].Parameter = 1) then
    380374            Inc(NumberOfBaseDecrement);
    381           NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    382           NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    383           NewProgram[NewProgramIndex].RelIndex := FProgram[FProgramIndex].RelIndex;
     375          NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    384376        end else begin
    385377          if ((FProgram[FProgramIndex].RelIndex + PointerChange) <> 0) then begin
     378            NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    386379            NewProgram[NewProgramIndex].Command := cmMultipy;
    387380            NewProgram[NewProgramIndex].Parameter := -FProgram[FProgramIndex].Parameter;
    388             NewProgram[NewProgramIndex].RelIndex := FProgram[FProgramIndex].RelIndex;
    389381          end else Dec(NewProgramIndex);
    390382        end;
    391383      end;
    392384      cmInput, cmOutput: begin
    393         NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    394         NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    395         NewProgram[NewProgramIndex].RelIndex := FProgram[FProgramIndex].RelIndex;
     385        NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    396386        Inc(NumberOfBaseDecrement, 2);
    397387      end;
    398388      cmSet: begin
    399         NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    400         NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    401         NewProgram[NewProgramIndex].RelIndex := FProgram[FProgramIndex].RelIndex;
     389        NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    402390        Inc(NumberOfBaseDecrement, 2);
    403391      end;
     
    408396          LoopStartIndex := FProgramIndex;
    409397          LoopStartIndexNew := NewProgramIndex;
    410           NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    411           NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    412           NewProgram[NewProgramIndex].RelIndex := FProgram[FProgramIndex].RelIndex;
     398          NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    413399        end else begin
    414400          Dec(NewProgramIndex);
     
    422408            ProcessLoop := True;
    423409          end else begin
    424             NewProgram[NewProgramIndex].Command := FProgram[FProgramIndex].Command;
    425             NewProgram[NewProgramIndex].Parameter := FProgram[FProgramIndex].Parameter;
    426             NewProgram[NewProgramIndex].RelIndex := FProgram[FProgramIndex].RelIndex;
     410            NewProgram[NewProgramIndex] := FProgram[FProgramIndex];
    427411          end;
    428412        end else begin
    429           NewProgram[NewProgramIndex].Command := cmSet;
    430           NewProgram[NewProgramIndex].Parameter := 0;
    431           NewProgram[NewProgramIndex].RelIndex := 0;
     413          NewProgram[NewProgramIndex] := TMachineOperation.Create(cmSet, 0, 0);
    432414          ProcessLoop := False;
    433415          NumberOfBaseDecrement := 0;
    434416        end;
    435417      end;
     418      else raise Exception.Create(Format('Unsupported command %d', [FProgram[FProgramIndex].Command]));
    436419    end;
    437420    DebugSteps.UpdateTargetPos(FProgramIndex, NewProgramIndex);
     
    458441    case FSourceCode[I] of
    459442      '+': begin
    460         FProgram[FProgramIndex].Command := cmInc;
    461         FProgram[FProgramIndex].Parameter := 1;
    462         FProgram[FProgramIndex].RelIndex := 0;
     443        FProgram[FProgramIndex] := TMachineOperation.Create(cmInc, 1, 0);
    463444        DebugSteps.AddStep(I - 1, FProgramIndex, soNormal);
    464445      end;
    465446      '-': begin
    466         FProgram[FProgramIndex].Command := cmDec;
    467         FProgram[FProgramIndex].Parameter := 1;
    468         FProgram[FProgramIndex].RelIndex := 0;
     447        FProgram[FProgramIndex] := TMachineOperation.Create(cmDec, 1, 0);
    469448        DebugSteps.AddStep(I - 1, FProgramIndex, soNormal);
    470449      end;
    471450      '>': begin
    472         FProgram[FProgramIndex].Command := cmPointerInc;
    473         FProgram[FProgramIndex].Parameter := 1;
    474         FProgram[FProgramIndex].RelIndex := 0;
     451        FProgram[FProgramIndex] := TMachineOperation.Create(cmPointerInc, 1, 0);
    475452        DebugSteps.AddStep(I - 1, FProgramIndex, soNormal);
    476453      end;
    477454      '<': begin
    478         FProgram[FProgramIndex].Command := cmPointerDec;
    479         FProgram[FProgramIndex].Parameter := 1;
    480         FProgram[FProgramIndex].RelIndex := 0;
     455        FProgram[FProgramIndex] := TMachineOperation.Create(cmPointerDec, 1, 0);
    481456        DebugSteps.AddStep(I - 1, FProgramIndex, soNormal);
    482457      end;
    483458      ',': begin
    484         FProgram[FProgramIndex].Command := cmInput;
    485         FProgram[FProgramIndex].Parameter := 0;
    486         FProgram[FProgramIndex].RelIndex := 0;
     459        FProgram[FProgramIndex] := TMachineOperation.Create(cmInput, 0, 0);
    487460        DebugSteps.AddStep(I - 1, FProgramIndex, soNormal);
    488461      end;
    489462      '.': begin
    490         FProgram[FProgramIndex].Command := cmOutput;
    491         FProgram[FProgramIndex].Parameter := 0;
    492         FProgram[FProgramIndex].RelIndex := 0;
     463        FProgram[FProgramIndex] := TMachineOperation.Create(cmOutput, 0, 0);
    493464        DebugSteps.AddStep(I - 1, FProgramIndex, soNormal);
    494465      end;
    495466      '[': begin
    496         FProgram[FProgramIndex].Command := cmLoopStart;
    497         FProgram[FProgramIndex].Parameter := 0;
    498         FProgram[FProgramIndex].RelIndex := 0;
     467        FProgram[FProgramIndex] := TMachineOperation.Create(cmLoopStart, 0, 0);
    499468        DebugSteps.AddStep(I - 1, FProgramIndex, soStepIn);
    500469      end;
    501470      ']': begin
    502         FProgram[FProgramIndex].Command := cmLoopEnd;
    503         FProgram[FProgramIndex].Parameter := 0;
    504         FProgram[FProgramIndex].RelIndex := 0;
     471        FProgram[FProgramIndex] := TMachineOperation.Create(cmLoopEnd, 0 ,0);
    505472        DebugSteps.AddStep(I - 1, FProgramIndex, soStepOut);
    506473      end
  • trunk/UCore.lfm

    r93 r96  
    2020    EmailContact = 'robie@centrum.cz'
    2121    AppName = 'LazFuck'
     22    Description = 'Simple BrainFuck IDE written in Lazarus/FPC.'
    2223    ReleaseDate = 43301
    2324    RegistryKey = '\Software\Chronosoft\LazFuck'
     
    951952    top = 100
    952953  end
     954  object ThemeManager: TThemeManager
     955    left = 302
     956    top = 174
     957  end
    953958end
  • trunk/UCore.pas

    r93 r96  
    88  Classes, SysUtils, FileUtil, UApplicationInfo, ULastOpenedList, UProject,
    99  UCoolTranslator, UTarget, URegistry, Registry, Graphics, Controls, UScaleDPI,
    10   UPersistentForm, UBFTarget;
     10  UPersistentForm, UTheme, UBFTarget;
    1111
    1212type
     
    2121    PersistentForm1: TPersistentForm;
    2222    ScaleDPI1: TScaleDPI;
     23    ThemeManager: TThemeManager;
    2324    procedure DataModuleCreate(Sender: TObject);
    2425    procedure DataModuleDestroy(Sender: TObject);
     
    109110    MemorySize := ReadIntegerWithDefault('MemorySize', 30000);
    110111    CellSize := ReadIntegerWithDefault('CellSize', 256);
     112    ThemeManager.Theme := ThemeManager.Themes.FindByName(ReadStringWithDefault('Theme', 'System'));
    111113  finally
    112114    Free;
     
    134136      WriteString('LanguageCode', CoolTranslator1.Language.Code)
    135137      else DeleteValue('LanguageCode');
     138    WriteString('Theme', ThemeManager.Theme.Name);
    136139  finally
    137140    Free;
Note: See TracChangeset for help on using the changeset viewer.