diff --git a/applications/iconeditor/iconstrconsts.pas b/applications/iconeditor/iconstrconsts.pas index f18e707ef..33677943b 100644 --- a/applications/iconeditor/iconstrconsts.pas +++ b/applications/iconeditor/iconstrconsts.pas @@ -50,6 +50,7 @@ resourcestring // Main Form lieMain = 'Lazarus Icon Editor'; + // main bar menu lieMenuFile = '&File'; lieMenuEdit = '&Edit'; @@ -169,7 +170,9 @@ resourcestring lieGroupBoxStretchMethod = 'Stretch method'; lieRadioButtonTruncate = 'Truncate'; lieRadioButtonSmooth = 'Smooth:'; - // Todo lieComboBoxSmooth = 'Area pixel'; + lieAreapixel = 'Area pixel'; + lieBilinear = 'Bilinear'; + lieBicubic = 'Bicubic'; // Dialog Resize Paper lielieResizePaperDialog = 'Resize paper'; @@ -179,10 +182,28 @@ resourcestring // lieCheckBoxAspectRatio = 'Preserve aspect ratio'; in dialog Resize // lieLabelPaperColor = 'Paper color:'; in dialog New // lieColorButtonPaper = 'Change...'; in dialog New - // Todo lieComboBoxPicturePosition = ''; + lieTopLeft = 'Top Left'; + lieTopCenter = 'Top Center'; + lieTopRight = 'Top Right'; + lieCenterLeft = 'Center Left'; + lieCentered = 'Centered'; + lieCenterRight = 'Center Right'; + lieBottomLeft = 'Bottom Left'; + lieBottomCenter = 'Bottom Center'; + lieBottomRight = 'Bottom Right'; + + //File Dialogs + lieColorDialog = 'Select color'; + lieOpenPictureDialog = 'Open existing file'; + lieSavePictureDialog = 'Save file as'; + lieExportResourceDialog = 'Export as lazarus resource'; implementation end. + + + + diff --git a/applications/iconeditor/laziconeditor.lpi b/applications/iconeditor/laziconeditor.lpi index 8193db47c..d6128045f 100644 --- a/applications/iconeditor/laziconeditor.lpi +++ b/applications/iconeditor/laziconeditor.lpi @@ -8,7 +8,7 @@ - <ActiveEditorIndexAtStart Value="5"/> + <ActiveEditorIndexAtStart Value="11"/> </General> <VersionInfo> <CurrentMajorRevNr Value="1"/> @@ -77,8 +77,8 @@ <IsPartOfProject Value="True"/> <ResourceFilename Value="preview.lrs"/> <UnitName Value="Preview"/> - <CursorPos X="22" Y="55"/> - <TopLine Value="38"/> + <CursorPos X="23" Y="66"/> + <TopLine Value="58"/> <EditorIndex Value="5"/> <UsageCount Value="146"/> <Loaded Value="True"/> @@ -449,8 +449,8 @@ <IsPartOfProject Value="True"/> <ResourceFilename Value="resizepaperdialog.lrs"/> <UnitName Value="ResizePaperDialog"/> - <CursorPos X="25" Y="38"/> - <TopLine Value="171"/> + <CursorPos X="24" Y="75"/> + <TopLine Value="69"/> <EditorIndex Value="11"/> <UsageCount Value="102"/> <Loaded Value="True"/> @@ -994,7 +994,24 @@ <Loaded Value="True"/> </Unit135> </Units> - <JumpHistory Count="0" HistoryIndex="-1"/> + <JumpHistory Count="4" HistoryIndex="3"> + <Position1> + <Filename Value="preview.pas"/> + <Caret Line="55" Column="31" TopLine="38"/> + </Position1> + <Position2> + <Filename Value="preview.pas"/> + <Caret Line="61" Column="3" TopLine="58"/> + </Position2> + <Position3> + <Filename Value="resizepaperdialog.pas"/> + <Caret Line="185" Column="60" TopLine="171"/> + </Position3> + <Position4> + <Filename Value="resizepaperdialog.pas"/> + <Caret Line="83" Column="26" TopLine="81"/> + </Position4> + </JumpHistory> </ProjectOptions> <CompilerOptions> <Version Value="5"/> diff --git a/applications/iconeditor/main.pas b/applications/iconeditor/main.pas index 436d878e5..facac928f 100644 --- a/applications/iconeditor/main.pas +++ b/applications/iconeditor/main.pas @@ -830,7 +830,9 @@ begin Palette.LoadPalette('../../default.pal'); + // Main Form Caption:=lieMain; + // Menus MenuItemFile.Caption := lieMenuFile; MenuItemEdit.Caption := lieMenuEdit; @@ -925,6 +927,12 @@ begin ToolPolygon.Hint:=lieHintToolPolygon; ToolEllipse.Hint:=lieHintToolEllipse; ToolRectangle.Hint:=lieHintToolRectangle; + + //File Dialogs + ColorDialog.Title:=lieColorDialog; + OpenPictureDialog.Title:=lieOpenPictureDialog; + SavePictureDialog.Title:=lieSavePictureDialog; + ExportResourceDialog.Title:=lieExportResourceDialog; end; procedure TMainForm.FormShow(Sender: TObject); @@ -1136,3 +1144,4 @@ end. + diff --git a/applications/iconeditor/newdialog.pas b/applications/iconeditor/newdialog.pas index 1ba6d3eff..0205a48eb 100644 --- a/applications/iconeditor/newdialog.pas +++ b/applications/iconeditor/newdialog.pas @@ -49,6 +49,7 @@ type LabelHeight: TLabel; UpDownWidth: TUpDown; UpDownHeight: TUpDown; + procedure FormCreate(Sender: TObject); private public end; @@ -57,12 +58,23 @@ var NewDialogForm: TNewDialogForm; implementation - +uses IconStrConsts; { TNewDialogForm } +procedure TNewDialogForm.FormCreate(Sender: TObject); +begin + Caption:=lieNewDialog; + LabelWidth.Caption:=lieLabelWidth; + LabelHeight.Caption:=lieLabelHeight; + LabelPaperColor.Caption:=lieLabelPaperColor; + ColorButtonPaper.Caption:=lieColorButtonPaper; + ButtonOK.Caption:=lieButtonOK; + ButtonCancel.Caption:=lieButtonCancel; +end; initialization {$I newdialog.lrs} end. + diff --git a/applications/iconeditor/resizedialog.lfm b/applications/iconeditor/resizedialog.lfm index 97cf66e88..d93c8818c 100644 --- a/applications/iconeditor/resizedialog.lfm +++ b/applications/iconeditor/resizedialog.lfm @@ -13,6 +13,7 @@ object ResizeDialogForm: TResizeDialogForm Height = 300 Top = 155 Width = 246 + OnCreate = FormCreate object GroupBoxProperties: TGroupBox Anchors = [akTop, akLeft, akRight, akBottom] Caption = 'Properties' diff --git a/applications/iconeditor/resizedialog.lrs b/applications/iconeditor/resizedialog.lrs index ca7572714..2484e86a0 100644 --- a/applications/iconeditor/resizedialog.lrs +++ b/applications/iconeditor/resizedialog.lrs @@ -4,42 +4,42 @@ LazarusResources.Add('TResizeDialogForm','FORMDATA',[ +#7'Caption'#6#14'Resize picture'#12'ClientHeight'#3','#1#11'ClientWidth'#3 +#246#0#13'PixelsPerInch'#2'`'#8'Position'#7#16'poMainFormCenter'#18'HorzScro' +'llBar.Page'#3#245#0#18'VertScrollBar.Page'#3'+'#1#4'Left'#3'-'#1#6'Height'#3 - +','#1#3'Top'#3#155#0#5'Width'#3#246#0#0#9'TGroupBox'#18'GroupBoxProperties'#7 - +'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#7'Caption'#6#10'Pro' - +'perties'#12'ClientHeight'#3#228#0#11'ClientWidth'#3#231#0#8'TabOrder'#2#0#4 - +'Left'#2#6#6'Height'#3#246#0#3'Top'#2#6#5'Width'#3#235#0#0#6'TLabel'#11'Labe' - +'lHeight'#7'Caption'#6#11'New height:'#5'Color'#7#6'clNone'#11'ParentColor'#8 - +#4'Left'#2#16#6'Height'#2#14#3'Top'#2'2'#5'Width'#2';'#0#0#6'TLabel'#10'Labe' - +'lWidth'#7'Caption'#6#10'New width:'#5'Color'#7#6'clNone'#11'ParentColor'#8#4 - +'Left'#2#16#6'Height'#2#14#3'Top'#2#14#5'Width'#2'7'#0#0#5'TEdit'#10'EditHei' - +'ght'#8'OnChange'#7#16'EditHeightChange'#9'OnKeyDown'#13#8'TabOrder'#2#0#4'T' - +'ext'#6#3'512'#4'Left'#2'j'#6'Height'#2#23#3'Top'#2','#5'Width'#2'P'#0#0#5'T' - +'Edit'#9'EditWidth'#8'OnChange'#7#15'EditWidthChange'#9'OnKeyDown'#13#8'TabO' - +'rder'#2#1#4'Text'#6#3'512'#4'Left'#2'j'#6'Height'#2#23#3'Top'#2#8#5'Width'#2 - +'P'#0#0#7'TUpDown'#12'UpDownHeight'#9'Associate'#7#10'EditHeight'#3'Min'#2#1 - +#3'Max'#3#0#16#8'Position'#3#0#2#9'Thousands'#8#4'Left'#3#186#0#6'Height'#2 - +#23#3'Top'#2','#5'Width'#2#17#0#0#7'TUpDown'#11'UpDownWidth'#9'Associate'#7#9 - +'EditWidth'#3'Min'#2#1#3'Max'#3#0#16#8'Position'#3#0#2#9'Thousands'#8#4'Left' - +#3#186#0#6'Height'#2#23#3'Top'#2#8#5'Width'#2#17#0#0#9'TCheckBox'#19'CheckBo' - +'xAspectRatio'#7'Caption'#6#21'Preserve aspect ratio'#7'Checked'#9#7'OnClick' - +#7#24'CheckBoxAspectRatioClick'#5'State'#7#9'cbChecked'#8'TabOrder'#2#2#4'Le' - +'ft'#2#16#6'Height'#2#13#3'Top'#2'U'#5'Width'#2'x'#0#0#9'TGroupBox'#21'Group' - +'BoxStretchMethod'#7'Caption'#6#14'Stretch method'#12'ClientHeight'#2'T'#11 - +'ClientWidth'#3#206#0#8'TabOrder'#2#3#4'Left'#2#10#6'Height'#2'f'#3'Top'#2't' - +#5'Width'#3#210#0#0#12'TRadioButton'#19'RadioButtonTruncate'#7'Caption'#6#8 - +'Truncate'#7'Checked'#9#5'State'#7#9'cbChecked'#8'TabOrder'#2#0#4'Left'#2#16 - +#6'Height'#2#13#3'Top'#2#13#5'Width'#2'?'#0#0#12'TRadioButton'#17'RadioButto' - +'nSmooth'#7'Caption'#6#7'Smooth:'#7'Enabled'#8#8'TabOrder'#2#1#4'Left'#2#16#6 - +'Height'#2#13#3'Top'#2','#5'Width'#2';'#0#0#9'TComboBox'#14'ComboBoxSmooth' - +#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending' - +#0#7'Enabled'#8#9'ItemIndex'#2#1#13'Items.Strings'#1#6#10'Area pixel'#6#8'Bi' - +'linear'#6#7'Bicubic'#0#9'MaxLength'#2#0#5'Style'#7#14'csDropDownList'#8'Tab' - +'Order'#2#2#4'Text'#6#8'Bilinear'#4'Left'#2'd'#6'Height'#2#21#3'Top'#2'&'#5 - +'Width'#2'`'#0#0#0#0#7'TButton'#12'ButtonCancel'#7'Anchors'#11#7'akRight'#8 - +'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#6'Cancel'#9#7'Caption'#6#6'Ca' - +'ncel'#11'ModalResult'#2#2#8'TabOrder'#2#1#4'Left'#3#165#0#6'Height'#2#25#3 - +'Top'#3#8#1#5'Width'#2'K'#0#0#7'TButton'#8'ButtonOK'#7'Anchors'#11#7'akRight' - +#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#2'OK'#7'Defaul' - +'t'#9#11'ModalResult'#2#1#8'TabOrder'#2#2#4'Left'#2'T'#6'Height'#2#25#3'Top' - +#3#8#1#5'Width'#2'K'#0#0#0 + +','#1#3'Top'#3#155#0#5'Width'#3#246#0#8'OnCreate'#7#10'FormCreate'#0#9'TGrou' + +'pBox'#18'GroupBoxProperties'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8 + +'akBottom'#0#7'Caption'#6#10'Properties'#12'ClientHeight'#3#228#0#11'ClientW' + +'idth'#3#231#0#8'TabOrder'#2#0#4'Left'#2#6#6'Height'#3#246#0#3'Top'#2#6#5'Wi' + +'dth'#3#235#0#0#6'TLabel'#11'LabelHeight'#7'Caption'#6#11'New height:'#5'Col' + +'or'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#16#6'Height'#2#14#3'Top'#2'2'#5 + +'Width'#2';'#0#0#6'TLabel'#10'LabelWidth'#7'Caption'#6#10'New width:'#5'Colo' + +'r'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#16#6'Height'#2#14#3'Top'#2#14#5 + +'Width'#2'7'#0#0#5'TEdit'#10'EditHeight'#8'OnChange'#7#16'EditHeightChange'#9 + +'OnKeyDown'#13#8'TabOrder'#2#0#4'Text'#6#3'512'#4'Left'#2'j'#6'Height'#2#23#3 + +'Top'#2','#5'Width'#2'P'#0#0#5'TEdit'#9'EditWidth'#8'OnChange'#7#15'EditWidt' + +'hChange'#9'OnKeyDown'#13#8'TabOrder'#2#1#4'Text'#6#3'512'#4'Left'#2'j'#6'He' + +'ight'#2#23#3'Top'#2#8#5'Width'#2'P'#0#0#7'TUpDown'#12'UpDownHeight'#9'Assoc' + +'iate'#7#10'EditHeight'#3'Min'#2#1#3'Max'#3#0#16#8'Position'#3#0#2#9'Thousan' + +'ds'#8#4'Left'#3#186#0#6'Height'#2#23#3'Top'#2','#5'Width'#2#17#0#0#7'TUpDow' + +'n'#11'UpDownWidth'#9'Associate'#7#9'EditWidth'#3'Min'#2#1#3'Max'#3#0#16#8'P' + +'osition'#3#0#2#9'Thousands'#8#4'Left'#3#186#0#6'Height'#2#23#3'Top'#2#8#5'W' + +'idth'#2#17#0#0#9'TCheckBox'#19'CheckBoxAspectRatio'#7'Caption'#6#21'Preserv' + +'e aspect ratio'#7'Checked'#9#7'OnClick'#7#24'CheckBoxAspectRatioClick'#5'St' + +'ate'#7#9'cbChecked'#8'TabOrder'#2#2#4'Left'#2#16#6'Height'#2#13#3'Top'#2'U' + +#5'Width'#2'x'#0#0#9'TGroupBox'#21'GroupBoxStretchMethod'#7'Caption'#6#14'St' + +'retch method'#12'ClientHeight'#2'T'#11'ClientWidth'#3#206#0#8'TabOrder'#2#3 + +#4'Left'#2#10#6'Height'#2'f'#3'Top'#2't'#5'Width'#3#210#0#0#12'TRadioButton' + +#19'RadioButtonTruncate'#7'Caption'#6#8'Truncate'#7'Checked'#9#5'State'#7#9 + +'cbChecked'#8'TabOrder'#2#0#4'Left'#2#16#6'Height'#2#13#3'Top'#2#13#5'Width' + +#2'?'#0#0#12'TRadioButton'#17'RadioButtonSmooth'#7'Caption'#6#7'Smooth:'#7'E' + +'nabled'#8#8'TabOrder'#2#1#4'Left'#2#16#6'Height'#2#13#3'Top'#2','#5'Width'#2 + +';'#0#0#9'TComboBox'#14'ComboBoxSmooth'#16'AutoCompleteText'#11#22'cbactEndO' + +'fLineComplete'#20'cbactSearchAscending'#0#7'Enabled'#8#9'ItemIndex'#2#1#13 + +'Items.Strings'#1#6#10'Area pixel'#6#8'Bilinear'#6#7'Bicubic'#0#9'MaxLength' + +#2#0#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#2#4'Text'#6#8'Bilinear'#4'L' + +'eft'#2'd'#6'Height'#2#21#3'Top'#2'&'#5'Width'#2'`'#0#0#0#0#7'TButton'#12'Bu' + +'ttonCancel'#7'Anchors'#11#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBo' + +'rder'#2#4#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder' + +#2#1#4'Left'#3#165#0#6'Height'#2#25#3'Top'#3#8#1#5'Width'#2'K'#0#0#7'TButton' + +#8'ButtonOK'#7'Anchors'#11#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBo' + +'rder'#2#4#7'Caption'#6#2'OK'#7'Default'#9#11'ModalResult'#2#1#8'TabOrder'#2 + +#2#4'Left'#2'T'#6'Height'#2#25#3'Top'#3#8#1#5'Width'#2'K'#0#0#0 ]); diff --git a/applications/iconeditor/resizedialog.pas b/applications/iconeditor/resizedialog.pas index 28b96304e..b8ed044ef 100644 --- a/applications/iconeditor/resizedialog.pas +++ b/applications/iconeditor/resizedialog.pas @@ -55,6 +55,7 @@ type procedure EditHeightChange(Sender: TObject); procedure EditWidthChange(Sender: TObject); procedure CheckBoxAspectRatioClick(Sender: TObject); + procedure FormCreate(Sender: TObject); protected procedure Initialize; override; public @@ -65,7 +66,7 @@ var ResizeDialogForm: TResizeDialogForm; implementation - +uses IconStrConsts; { TResizeDialogForm } procedure TResizeDialogForm.EditHeightChange(Sender: TObject); @@ -103,6 +104,24 @@ begin end; end; +procedure TResizeDialogForm.FormCreate(Sender: TObject); +begin + Caption:=lieResizeDialog; + GroupBoxProperties.Caption:=lieGroupBoxProperties; + LabelWidth.Caption:=lieLabelNewWidth; + LabelHeight.Caption:=lieLabelNewHeight; + CheckBoxAspectRatio.Caption:=lieCheckBoxAspectRatio; + GroupBoxStretchMethod.Caption:=lieGroupBoxStretchMethod; + RadioButtonTruncate.Caption:=lieRadioButtonTruncate; + RadioButtonSmooth.Caption:=lieRadioButtonSmooth; + ComboBoxSmooth.Items.Clear; + ComboBoxSmooth.Items.Add(lieAreapixel); + ComboBoxSmooth.Items.Add(lieBilinear); + ComboBoxSmooth.Items.Add(lieBicubic); + ButtonOK.Caption:=lieButtonOK; + ButtonCancel.Caption:=lieButtonCancel; +end; + procedure TResizeDialogForm.Initialize; begin UpDownWidth.Position := Picture.Width; @@ -125,3 +144,4 @@ initialization end. + diff --git a/applications/iconeditor/resizepaperdialog.pas b/applications/iconeditor/resizepaperdialog.pas index a02eb0661..81091fbcc 100644 --- a/applications/iconeditor/resizepaperdialog.pas +++ b/applications/iconeditor/resizepaperdialog.pas @@ -72,7 +72,7 @@ type var ResizePaperDialogForm: TResizePaperDialogForm; - Preview: TPictureEdit; + Preview: TPictureView; implementation uses IconStrConsts; @@ -80,7 +80,7 @@ uses IconStrConsts; procedure TResizePaperDialogForm.FormCreate(Sender: TObject); begin - Preview := TPictureEdit.Create(PanelPreview); + Preview := TPictureView.Create(PanelPreview); Preview.Parent := PanelPreview; Preview.Align := alClient; @@ -93,8 +93,16 @@ begin ColorButtonPaper.Caption:=lieColorButtonPaper; ButtonOK.Caption:=lieButtonOK; ButtonCancel.Caption:=lieButtonCancel; -// Todo ComboBoxPicturePosition - + ComboBoxPicturePosition.Items.Clear; + ComboBoxPicturePosition.Items.Add(lieTopLeft); + ComboBoxPicturePosition.Items.Add(lieTopCenter); + ComboBoxPicturePosition.Items.Add(lieTopRight); + ComboBoxPicturePosition.Items.Add(lieCenterLeft); + ComboBoxPicturePosition.Items.Add(lieCentered); + ComboBoxPicturePosition.Items.Add(lieCenterRight); + ComboBoxPicturePosition.Items.Add(lieBottomLeft); + ComboBoxPicturePosition.Items.Add(lieBottomCenter); + ComboBoxPicturePosition.Items.Add(lieBottomRight); end; procedure TResizePaperDialogForm.EditHeightChange(Sender: TObject); @@ -210,3 +218,4 @@ initialization end. +