mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-10-31 12:01:27 +01:00 
			
		
		
		
	IdeIntf: Make translated texts fit in ImageList editor buttons. Issue #33775, patch from FTurtle.
git-svn-id: trunk@58020 -
This commit is contained in:
		
							parent
							
								
									edb623c267
								
							
						
					
					
						commit
						d5a918a748
					
				| @ -1,49 +1,60 @@ | |||||||
| object ImageListEditorDlg: TImageListEditorDlg | object ImageListEditorDlg: TImageListEditorDlg | ||||||
|   Left = 453 |   Left = 453 | ||||||
|   Height = 424 |   Height = 484 | ||||||
|   Top = 144 |   Top = 144 | ||||||
|   Width = 671 |   Width = 617 | ||||||
|   BorderIcons = [biSystemMenu, biHelp] |   BorderIcons = [biSystemMenu, biHelp] | ||||||
|   Caption = 'ImagesList Editor' |   Caption = 'ImagesList Editor' | ||||||
|   ClientHeight = 424 |   ClientHeight = 484 | ||||||
|   ClientWidth = 671 |   ClientWidth = 617 | ||||||
|   Constraints.MinHeight = 345 |   Constraints.MinHeight = 394 | ||||||
|   Constraints.MinWidth = 520 |   Constraints.MinWidth = 560 | ||||||
|   OnClose = FormClose |   OnClose = FormClose | ||||||
|   OnCreate = FormCreate |   OnCreate = FormCreate | ||||||
|   OnResize = FormResize |   OnResize = FormResize | ||||||
|  |   OnShow = FormShow | ||||||
|   Position = poScreenCenter |   Position = poScreenCenter | ||||||
|   LCLVersion = '1.9.0.0' |   LCLVersion = '1.9.0.0' | ||||||
|   object GroupBoxR: TGroupBox |   object GroupBoxR: TGroupBox | ||||||
|  |     AnchorSideLeft.Control = GroupBoxL | ||||||
|  |     AnchorSideLeft.Side = asrBottom | ||||||
|     AnchorSideTop.Control = Owner |     AnchorSideTop.Control = Owner | ||||||
|     AnchorSideRight.Control = Owner |     AnchorSideRight.Control = Owner | ||||||
|     AnchorSideRight.Side = asrBottom |     AnchorSideRight.Side = asrBottom | ||||||
|     AnchorSideBottom.Control = BtnPanel |     AnchorSideBottom.Control = BtnPanel | ||||||
|     Left = 376 |     Left = 364 | ||||||
|     Height = 380 |     Height = 440 | ||||||
|     Top = 6 |     Top = 6 | ||||||
|     Width = 289 |     Width = 247 | ||||||
|     Anchors = [akTop, akLeft, akRight, akBottom] |     Anchors = [akTop, akLeft, akRight, akBottom] | ||||||
|     BorderSpacing.Around = 6 |     BorderSpacing.Around = 6 | ||||||
|     Caption = 'Selected Image' |     Caption = 'Selected Image' | ||||||
|     ClientHeight = 360 |     ClientHeight = 422 | ||||||
|     ClientWidth = 285 |     ClientWidth = 243 | ||||||
|     TabOrder = 1 |     TabOrder = 1 | ||||||
|     object LabelTransparent: TLabel |     object LabelTransparent: TLabel | ||||||
|       Left = 110 |       AnchorSideLeft.Control = RadioGroup | ||||||
|       Height = 15 |       AnchorSideLeft.Side = asrBottom | ||||||
|       Top = 253 |       AnchorSideTop.Control = RadioGroup | ||||||
|       Width = 97 |       Left = 86 | ||||||
|       Anchors = [akLeft, akBottom] |       Height = 14 | ||||||
|       BorderSpacing.Around = 6 |       Top = 316 | ||||||
|  |       Width = 91 | ||||||
|  |       Anchors = [akTop, akLeft, akBottom] | ||||||
|  |       BorderSpacing.Left = 6 | ||||||
|       Caption = 'Transparent Color:' |       Caption = 'Transparent Color:' | ||||||
|       ParentColor = False |       ParentColor = False | ||||||
|     end |     end | ||||||
|     object Preview: TScrollBox |     object Preview: TScrollBox | ||||||
|  |       AnchorSideLeft.Control = GroupBoxR | ||||||
|  |       AnchorSideTop.Control = GroupBoxR | ||||||
|  |       AnchorSideRight.Control = GroupBoxR | ||||||
|  |       AnchorSideRight.Side = asrBottom | ||||||
|  |       AnchorSideBottom.Control = RadioGroup | ||||||
|       Left = 6 |       Left = 6 | ||||||
|       Height = 238 |       Height = 304 | ||||||
|       Top = 6 |       Top = 6 | ||||||
|       Width = 272 |       Width = 231 | ||||||
|       HorzScrollBar.Increment = 1 |       HorzScrollBar.Increment = 1 | ||||||
|       HorzScrollBar.Page = 1 |       HorzScrollBar.Page = 1 | ||||||
|       HorzScrollBar.Smooth = True |       HorzScrollBar.Smooth = True | ||||||
| @ -53,30 +64,35 @@ object ImageListEditorDlg: TImageListEditorDlg | |||||||
|       VertScrollBar.Smooth = True |       VertScrollBar.Smooth = True | ||||||
|       VertScrollBar.Tracking = True |       VertScrollBar.Tracking = True | ||||||
|       Anchors = [akTop, akLeft, akRight, akBottom] |       Anchors = [akTop, akLeft, akRight, akBottom] | ||||||
|       BorderSpacing.Around = 4 |       BorderSpacing.Around = 6 | ||||||
|       Color = clDefault |       Color = clDefault | ||||||
|       ParentColor = False |       ParentColor = False | ||||||
|       TabOrder = 0 |       TabOrder = 0 | ||||||
|     end |     end | ||||||
|     object RadioGroup: TRadioGroup |     object RadioGroup: TRadioGroup | ||||||
|       Left = 7 |       AnchorSideLeft.Control = GroupBoxR | ||||||
|       Height = 105 |       AnchorSideBottom.Control = GroupBoxR | ||||||
|       Top = 250 |       AnchorSideBottom.Side = asrBottom | ||||||
|       Width = 96 |       Left = 6 | ||||||
|  |       Height = 100 | ||||||
|  |       Top = 316 | ||||||
|  |       Width = 74 | ||||||
|       Anchors = [akLeft, akBottom] |       Anchors = [akLeft, akBottom] | ||||||
|       AutoFill = True |       AutoFill = True | ||||||
|  |       AutoSize = True | ||||||
|       BorderSpacing.Around = 6 |       BorderSpacing.Around = 6 | ||||||
|       Caption = 'Adjustment' |       Caption = 'Adjustment' | ||||||
|       ChildSizing.LeftRightSpacing = 6 |       ChildSizing.LeftRightSpacing = 6 | ||||||
|       ChildSizing.TopBottomSpacing = 6 |       ChildSizing.TopBottomSpacing = 4 | ||||||
|  |       ChildSizing.VerticalSpacing = 2 | ||||||
|       ChildSizing.EnlargeHorizontal = crsHomogenousChildResize |       ChildSizing.EnlargeHorizontal = crsHomogenousChildResize | ||||||
|       ChildSizing.EnlargeVertical = crsHomogenousSpaceResize |       ChildSizing.EnlargeVertical = crsHomogenousSpaceResize | ||||||
|       ChildSizing.ShrinkHorizontal = crsScaleChilds |       ChildSizing.ShrinkHorizontal = crsScaleChilds | ||||||
|       ChildSizing.ShrinkVertical = crsScaleChilds |       ChildSizing.ShrinkVertical = crsScaleChilds | ||||||
|       ChildSizing.Layout = cclLeftToRightThenTopToBottom |       ChildSizing.Layout = cclLeftToRightThenTopToBottom | ||||||
|       ChildSizing.ControlsPerLine = 1 |       ChildSizing.ControlsPerLine = 1 | ||||||
|       ClientHeight = 85 |       ClientHeight = 82 | ||||||
|       ClientWidth = 92 |       ClientWidth = 70 | ||||||
|       Enabled = False |       Enabled = False | ||||||
|       ItemIndex = 0 |       ItemIndex = 0 | ||||||
|       Items.Strings = ( |       Items.Strings = ( | ||||||
| @ -89,14 +105,16 @@ object ImageListEditorDlg: TImageListEditorDlg | |||||||
|       TabOrder = 1 |       TabOrder = 1 | ||||||
|     end |     end | ||||||
|     object ColorBoxTransparent: TColorBox |     object ColorBoxTransparent: TColorBox | ||||||
|  |       AnchorSideLeft.Control = LabelTransparent | ||||||
|       AnchorSideTop.Control = LabelTransparent |       AnchorSideTop.Control = LabelTransparent | ||||||
|       AnchorSideTop.Side = asrBottom |       AnchorSideTop.Side = asrBottom | ||||||
|       Left = 110 |       Left = 86 | ||||||
|       Height = 22 |       Height = 22 | ||||||
|       Top = 274 |       Top = 334 | ||||||
|       Width = 96 |       Width = 96 | ||||||
|       Selected = clFuchsia |       Selected = clFuchsia | ||||||
|       Style = [cbStandardColors, cbExtendedColors, cbIncludeDefault, cbCustomColor, cbPrettyNames] |       Style = [cbStandardColors, cbExtendedColors, cbIncludeDefault, cbCustomColor, cbPrettyNames] | ||||||
|  |       BorderSpacing.Top = 4 | ||||||
|       Enabled = False |       Enabled = False | ||||||
|       ItemHeight = 16 |       ItemHeight = 16 | ||||||
|       OnChange = ColorBoxTransparentClick |       OnChange = ColorBoxTransparentClick | ||||||
| @ -108,142 +126,157 @@ object ImageListEditorDlg: TImageListEditorDlg | |||||||
|     AnchorSideTop.Control = Owner |     AnchorSideTop.Control = Owner | ||||||
|     AnchorSideBottom.Control = BtnPanel |     AnchorSideBottom.Control = BtnPanel | ||||||
|     Left = 6 |     Left = 6 | ||||||
|     Height = 380 |     Height = 440 | ||||||
|     Top = 6 |     Top = 6 | ||||||
|     Width = 364 |     Width = 352 | ||||||
|     Anchors = [akTop, akLeft, akBottom] |     Anchors = [akTop, akLeft, akBottom] | ||||||
|  |     AutoSize = True | ||||||
|     BorderSpacing.Around = 6 |     BorderSpacing.Around = 6 | ||||||
|     Caption = 'Images' |     Caption = 'Images' | ||||||
|     ClientHeight = 360 |     ClientHeight = 422 | ||||||
|     ClientWidth = 360 |     ClientWidth = 348 | ||||||
|     TabOrder = 0 |     TabOrder = 0 | ||||||
|     object BtnAdd: TButton |     object BtnAdd: TButton | ||||||
|       Tag = 1 |       Tag = 1 | ||||||
|  |       AnchorSideLeft.Control = ImageListBox | ||||||
|       AnchorSideLeft.Side = asrBottom |       AnchorSideLeft.Side = asrBottom | ||||||
|       AnchorSideTop.Control = GroupBoxL |       AnchorSideTop.Control = ImageListBox | ||||||
|       AnchorSideRight.Control = GroupBoxL |  | ||||||
|       AnchorSideRight.Side = asrBottom |       AnchorSideRight.Side = asrBottom | ||||||
|       Left = 200 |       Left = 198 | ||||||
|       Height = 23 |       Height = 23 | ||||||
|       Top = 4 |       Top = 6 | ||||||
|       Width = 156 |       Width = 57 | ||||||
|       Anchors = [akTop, akRight] |       AutoSize = True | ||||||
|       BorderSpacing.Top = 4 |       BorderSpacing.Left = 6 | ||||||
|       BorderSpacing.Right = 4 |       BorderSpacing.Right = 6 | ||||||
|       Caption = 'Add...' |       Caption = 'Add...' | ||||||
|       OnClick = BtnAddClick |       OnClick = BtnAddClick | ||||||
|       TabOrder = 0 |       TabOrder = 0 | ||||||
|     end |     end | ||||||
|     object BtnClear: TButton |     object BtnClear: TButton | ||||||
|       AnchorSideLeft.Control = BtnAdd |       AnchorSideLeft.Control = ImageListBox | ||||||
|  |       AnchorSideLeft.Side = asrBottom | ||||||
|       AnchorSideTop.Control = BtnDelete |       AnchorSideTop.Control = BtnDelete | ||||||
|       AnchorSideTop.Side = asrBottom |       AnchorSideTop.Side = asrBottom | ||||||
|       AnchorSideRight.Control = BtnAdd |  | ||||||
|       AnchorSideRight.Side = asrBottom |       AnchorSideRight.Side = asrBottom | ||||||
|       Left = 200 |       Left = 198 | ||||||
|       Height = 23 |       Height = 23 | ||||||
|       Top = 139 |       Top = 141 | ||||||
|       Width = 156 |       Width = 51 | ||||||
|       Anchors = [akTop, akLeft, akRight] |       AutoSize = True | ||||||
|  |       BorderSpacing.Left = 6 | ||||||
|       BorderSpacing.Top = 4 |       BorderSpacing.Top = 4 | ||||||
|  |       BorderSpacing.Right = 6 | ||||||
|       Caption = 'Clear' |       Caption = 'Clear' | ||||||
|       OnClick = BtnClearClick |       OnClick = BtnClearClick | ||||||
|       TabOrder = 3 |       TabOrder = 3 | ||||||
|     end |     end | ||||||
|     object BtnDelete: TButton |     object BtnDelete: TButton | ||||||
|       AnchorSideLeft.Control = BtnAdd |       AnchorSideLeft.Control = ImageListBox | ||||||
|  |       AnchorSideLeft.Side = asrBottom | ||||||
|       AnchorSideTop.Control = BtnReplaceAll |       AnchorSideTop.Control = BtnReplaceAll | ||||||
|       AnchorSideTop.Side = asrBottom |       AnchorSideTop.Side = asrBottom | ||||||
|       AnchorSideRight.Control = BtnAdd |  | ||||||
|       AnchorSideRight.Side = asrBottom |       AnchorSideRight.Side = asrBottom | ||||||
|       Left = 200 |       Left = 198 | ||||||
|       Height = 23 |       Height = 23 | ||||||
|       Top = 112 |       Top = 114 | ||||||
|       Width = 156 |       Width = 57 | ||||||
|       Anchors = [akTop, akLeft, akRight] |       AutoSize = True | ||||||
|  |       BorderSpacing.Left = 6 | ||||||
|       BorderSpacing.Top = 4 |       BorderSpacing.Top = 4 | ||||||
|  |       BorderSpacing.Right = 6 | ||||||
|       Caption = '&Delete' |       Caption = '&Delete' | ||||||
|       OnClick = BtnDeleteClick |       OnClick = BtnDeleteClick | ||||||
|       TabOrder = 2 |       TabOrder = 2 | ||||||
|     end |     end | ||||||
|     object BtnMoveUp: TButton |     object BtnMoveUp: TButton | ||||||
|       Tag = -1 |       Tag = -1 | ||||||
|       AnchorSideLeft.Control = BtnAdd |       AnchorSideLeft.Control = ImageListBox | ||||||
|  |       AnchorSideLeft.Side = asrBottom | ||||||
|       AnchorSideTop.Control = BtnClear |       AnchorSideTop.Control = BtnClear | ||||||
|       AnchorSideTop.Side = asrBottom |       AnchorSideTop.Side = asrBottom | ||||||
|       AnchorSideRight.Control = BtnAdd |  | ||||||
|       AnchorSideRight.Side = asrBottom |       AnchorSideRight.Side = asrBottom | ||||||
|       Left = 200 |       Left = 198 | ||||||
|       Height = 23 |       Height = 23 | ||||||
|       Top = 166 |       Top = 168 | ||||||
|       Width = 156 |       Width = 68 | ||||||
|       Anchors = [akTop, akLeft, akRight] |       AutoSize = True | ||||||
|  |       BorderSpacing.Left = 6 | ||||||
|       BorderSpacing.Top = 4 |       BorderSpacing.Top = 4 | ||||||
|  |       BorderSpacing.Right = 6 | ||||||
|       Caption = 'Move Up' |       Caption = 'Move Up' | ||||||
|       OnClick = BtnMoveUpClick |       OnClick = BtnMoveUpClick | ||||||
|       TabOrder = 4 |       TabOrder = 4 | ||||||
|     end |     end | ||||||
|     object BtnMoveDown: TButton |     object BtnMoveDown: TButton | ||||||
|       Tag = 1 |       Tag = 1 | ||||||
|       AnchorSideLeft.Control = BtnAdd |       AnchorSideLeft.Control = ImageListBox | ||||||
|  |       AnchorSideLeft.Side = asrBottom | ||||||
|       AnchorSideTop.Control = BtnMoveUp |       AnchorSideTop.Control = BtnMoveUp | ||||||
|       AnchorSideTop.Side = asrBottom |       AnchorSideTop.Side = asrBottom | ||||||
|       AnchorSideRight.Control = BtnAdd |  | ||||||
|       AnchorSideRight.Side = asrBottom |       AnchorSideRight.Side = asrBottom | ||||||
|       Left = 200 |       Left = 198 | ||||||
|       Height = 23 |       Height = 23 | ||||||
|       Top = 193 |       Top = 195 | ||||||
|       Width = 156 |       Width = 82 | ||||||
|       Anchors = [akTop, akLeft, akRight] |       AutoSize = True | ||||||
|  |       BorderSpacing.Left = 6 | ||||||
|       BorderSpacing.Top = 4 |       BorderSpacing.Top = 4 | ||||||
|  |       BorderSpacing.Right = 6 | ||||||
|       Caption = 'Move Down' |       Caption = 'Move Down' | ||||||
|       OnClick = BtnMoveUpClick |       OnClick = BtnMoveUpClick | ||||||
|       TabOrder = 5 |       TabOrder = 5 | ||||||
|     end |     end | ||||||
|     object BtnSave: TButton |     object BtnSave: TButton | ||||||
|       AnchorSideLeft.Control = BtnAdd |       AnchorSideLeft.Control = ImageListBox | ||||||
|  |       AnchorSideLeft.Side = asrBottom | ||||||
|       AnchorSideTop.Control = BtnMoveDown |       AnchorSideTop.Control = BtnMoveDown | ||||||
|       AnchorSideTop.Side = asrBottom |       AnchorSideTop.Side = asrBottom | ||||||
|       AnchorSideRight.Control = BtnAdd |  | ||||||
|       AnchorSideRight.Side = asrBottom |       AnchorSideRight.Side = asrBottom | ||||||
|       Left = 200 |       Left = 198 | ||||||
|       Height = 23 |       Height = 23 | ||||||
|       Top = 220 |       Top = 222 | ||||||
|       Width = 156 |       Width = 62 | ||||||
|       Anchors = [akTop, akLeft, akRight] |       AutoSize = True | ||||||
|  |       BorderSpacing.Left = 6 | ||||||
|       BorderSpacing.Top = 4 |       BorderSpacing.Top = 4 | ||||||
|  |       BorderSpacing.Right = 6 | ||||||
|       Caption = 'Save...' |       Caption = 'Save...' | ||||||
|       OnClick = BtnSaveClick |       OnClick = BtnSaveClick | ||||||
|       TabOrder = 6 |       TabOrder = 6 | ||||||
|     end |     end | ||||||
|     object btnSaveAll: TButton |     object btnSaveAll: TButton | ||||||
|       AnchorSideLeft.Control = BtnAdd |       AnchorSideLeft.Control = ImageListBox | ||||||
|  |       AnchorSideLeft.Side = asrBottom | ||||||
|       AnchorSideTop.Control = BtnSave |       AnchorSideTop.Control = BtnSave | ||||||
|       AnchorSideTop.Side = asrBottom |       AnchorSideTop.Side = asrBottom | ||||||
|       AnchorSideRight.Control = BtnAdd |  | ||||||
|       AnchorSideRight.Side = asrBottom |       AnchorSideRight.Side = asrBottom | ||||||
|       Left = 200 |       Left = 198 | ||||||
|       Height = 23 |       Height = 23 | ||||||
|       Top = 247 |       Top = 249 | ||||||
|       Width = 156 |       Width = 76 | ||||||
|       Anchors = [akTop, akLeft, akRight] |       AutoSize = True | ||||||
|  |       BorderSpacing.Left = 6 | ||||||
|       BorderSpacing.Top = 4 |       BorderSpacing.Top = 4 | ||||||
|  |       BorderSpacing.Right = 6 | ||||||
|       Caption = 'Save All...' |       Caption = 'Save All...' | ||||||
|       OnClick = btnSaveAllClick |       OnClick = btnSaveAllClick | ||||||
|       TabOrder = 7 |       TabOrder = 7 | ||||||
|     end |     end | ||||||
|     object BtnReplace: TButton |     object BtnReplace: TButton | ||||||
|       AnchorSideLeft.Control = BtnAdd |       AnchorSideLeft.Control = ImageListBox | ||||||
|  |       AnchorSideLeft.Side = asrBottom | ||||||
|       AnchorSideTop.Control = BtnAddMoreResolutions |       AnchorSideTop.Control = BtnAddMoreResolutions | ||||||
|       AnchorSideTop.Side = asrBottom |       AnchorSideTop.Side = asrBottom | ||||||
|       AnchorSideRight.Control = BtnAdd |  | ||||||
|       AnchorSideRight.Side = asrBottom |       AnchorSideRight.Side = asrBottom | ||||||
|       Left = 200 |       Left = 198 | ||||||
|       Height = 23 |       Height = 23 | ||||||
|       Top = 58 |       Top = 60 | ||||||
|       Width = 156 |       Width = 76 | ||||||
|       Anchors = [akTop, akLeft, akRight] |       AutoSize = True | ||||||
|  |       BorderSpacing.Left = 6 | ||||||
|       BorderSpacing.Top = 4 |       BorderSpacing.Top = 4 | ||||||
|  |       BorderSpacing.Right = 6 | ||||||
|       Caption = '&Replace...' |       Caption = '&Replace...' | ||||||
|       OnClick = BtnReplaceClick |       OnClick = BtnReplaceClick | ||||||
|       TabOrder = 1 |       TabOrder = 1 | ||||||
| @ -251,12 +284,14 @@ object ImageListEditorDlg: TImageListEditorDlg | |||||||
|     object ImageListBox: TListBox |     object ImageListBox: TListBox | ||||||
|       AnchorSideLeft.Control = GroupBoxL |       AnchorSideLeft.Control = GroupBoxL | ||||||
|       AnchorSideTop.Control = GroupBoxL |       AnchorSideTop.Control = GroupBoxL | ||||||
|       Left = 4 |       AnchorSideBottom.Control = GroupBoxL | ||||||
|       Height = 351 |       AnchorSideBottom.Side = asrBottom | ||||||
|       Top = 4 |       Left = 6 | ||||||
|       Width = 188 |       Height = 410 | ||||||
|       Anchors = [akTop, akLeft, akRight, akBottom] |       Top = 6 | ||||||
|       BorderSpacing.Around = 4 |       Width = 186 | ||||||
|  |       Anchors = [akTop, akLeft, akBottom] | ||||||
|  |       BorderSpacing.Around = 6 | ||||||
|       ItemHeight = 0 |       ItemHeight = 0 | ||||||
|       OnDrawItem = ImageListBoxDrawItem |       OnDrawItem = ImageListBoxDrawItem | ||||||
|       OnSelectionChange = ImageListBoxSelectionChange |       OnSelectionChange = ImageListBoxSelectionChange | ||||||
| @ -265,66 +300,74 @@ object ImageListEditorDlg: TImageListEditorDlg | |||||||
|       TabOrder = 8 |       TabOrder = 8 | ||||||
|     end |     end | ||||||
|     object btnAddNewResolution: TButton |     object btnAddNewResolution: TButton | ||||||
|       AnchorSideLeft.Control = BtnAdd |       AnchorSideLeft.Control = ImageListBox | ||||||
|  |       AnchorSideLeft.Side = asrBottom | ||||||
|       AnchorSideTop.Control = btnSaveAll |       AnchorSideTop.Control = btnSaveAll | ||||||
|       AnchorSideTop.Side = asrBottom |       AnchorSideTop.Side = asrBottom | ||||||
|       AnchorSideRight.Control = BtnAdd |  | ||||||
|       AnchorSideRight.Side = asrBottom |       AnchorSideRight.Side = asrBottom | ||||||
|       Left = 200 |       Left = 198 | ||||||
|       Height = 23 |       Height = 23 | ||||||
|       Top = 274 |       Top = 276 | ||||||
|       Width = 156 |       Width = 130 | ||||||
|       Anchors = [akTop, akLeft, akRight] |       AutoSize = True | ||||||
|  |       BorderSpacing.Left = 6 | ||||||
|       BorderSpacing.Top = 4 |       BorderSpacing.Top = 4 | ||||||
|  |       BorderSpacing.Right = 6 | ||||||
|       Caption = 'Add new resolution...' |       Caption = 'Add new resolution...' | ||||||
|       OnClick = btnAddNewResolutionClick |       OnClick = btnAddNewResolutionClick | ||||||
|       TabOrder = 9 |       TabOrder = 9 | ||||||
|     end |     end | ||||||
|     object BtnReplaceAll: TButton |     object BtnReplaceAll: TButton | ||||||
|       AnchorSideLeft.Control = BtnAdd |       AnchorSideLeft.Control = ImageListBox | ||||||
|  |       AnchorSideLeft.Side = asrBottom | ||||||
|       AnchorSideTop.Control = BtnReplace |       AnchorSideTop.Control = BtnReplace | ||||||
|       AnchorSideTop.Side = asrBottom |       AnchorSideTop.Side = asrBottom | ||||||
|       AnchorSideRight.Control = BtnAdd |  | ||||||
|       AnchorSideRight.Side = asrBottom |       AnchorSideRight.Side = asrBottom | ||||||
|       Left = 200 |       Left = 198 | ||||||
|       Height = 23 |       Height = 23 | ||||||
|       Top = 85 |       Top = 87 | ||||||
|       Width = 156 |       Width = 144 | ||||||
|       Anchors = [akTop, akLeft, akRight] |       AutoSize = True | ||||||
|  |       BorderSpacing.Left = 6 | ||||||
|       BorderSpacing.Top = 4 |       BorderSpacing.Top = 4 | ||||||
|  |       BorderSpacing.Right = 6 | ||||||
|       Caption = '&Replace all resolutions...' |       Caption = '&Replace all resolutions...' | ||||||
|       OnClick = BtnReplaceClick |       OnClick = BtnReplaceClick | ||||||
|       TabOrder = 10 |       TabOrder = 10 | ||||||
|     end |     end | ||||||
|     object BtnAddMoreResolutions: TButton |     object BtnAddMoreResolutions: TButton | ||||||
|       Tag = 1 |       Tag = 1 | ||||||
|       AnchorSideLeft.Control = BtnAdd |       AnchorSideLeft.Control = ImageListBox | ||||||
|  |       AnchorSideLeft.Side = asrBottom | ||||||
|       AnchorSideTop.Control = BtnAdd |       AnchorSideTop.Control = BtnAdd | ||||||
|       AnchorSideTop.Side = asrBottom |       AnchorSideTop.Side = asrBottom | ||||||
|       AnchorSideRight.Control = BtnAdd |  | ||||||
|       AnchorSideRight.Side = asrBottom |       AnchorSideRight.Side = asrBottom | ||||||
|       Left = 200 |       Left = 198 | ||||||
|       Height = 23 |       Height = 23 | ||||||
|       Top = 31 |       Top = 33 | ||||||
|       Width = 156 |       Width = 139 | ||||||
|       Anchors = [akTop, akLeft, akRight] |       AutoSize = True | ||||||
|  |       BorderSpacing.Left = 6 | ||||||
|       BorderSpacing.Top = 4 |       BorderSpacing.Top = 4 | ||||||
|  |       BorderSpacing.Right = 6 | ||||||
|       Caption = 'Add more resolutions...' |       Caption = 'Add more resolutions...' | ||||||
|       OnClick = BtnAddClick |       OnClick = BtnAddClick | ||||||
|       TabOrder = 11 |       TabOrder = 11 | ||||||
|     end |     end | ||||||
|     object btnDeleteResolution: TButton |     object btnDeleteResolution: TButton | ||||||
|       AnchorSideLeft.Control = BtnAdd |       AnchorSideLeft.Control = ImageListBox | ||||||
|  |       AnchorSideLeft.Side = asrBottom | ||||||
|       AnchorSideTop.Control = btnAddNewResolution |       AnchorSideTop.Control = btnAddNewResolution | ||||||
|       AnchorSideTop.Side = asrBottom |       AnchorSideTop.Side = asrBottom | ||||||
|       AnchorSideRight.Control = BtnAdd |  | ||||||
|       AnchorSideRight.Side = asrBottom |       AnchorSideRight.Side = asrBottom | ||||||
|       Left = 200 |       Left = 198 | ||||||
|       Height = 23 |       Height = 23 | ||||||
|       Top = 301 |       Top = 303 | ||||||
|       Width = 156 |       Width = 122 | ||||||
|       Anchors = [akTop, akLeft, akRight] |       AutoSize = True | ||||||
|  |       BorderSpacing.Left = 6 | ||||||
|       BorderSpacing.Top = 4 |       BorderSpacing.Top = 4 | ||||||
|  |       BorderSpacing.Right = 6 | ||||||
|       Caption = 'Delete resolution ...' |       Caption = 'Delete resolution ...' | ||||||
|       OnClick = btnDeleteResolutionClick |       OnClick = btnDeleteResolutionClick | ||||||
|       TabOrder = 12 |       TabOrder = 12 | ||||||
| @ -333,8 +376,8 @@ object ImageListEditorDlg: TImageListEditorDlg | |||||||
|   object BtnPanel: TButtonPanel |   object BtnPanel: TButtonPanel | ||||||
|     Left = 6 |     Left = 6 | ||||||
|     Height = 26 |     Height = 26 | ||||||
|     Top = 392 |     Top = 452 | ||||||
|     Width = 659 |     Width = 605 | ||||||
|     OKButton.Name = 'OKButton' |     OKButton.Name = 'OKButton' | ||||||
|     OKButton.DefaultCaption = True |     OKButton.DefaultCaption = True | ||||||
|     HelpButton.Name = 'HelpButton' |     HelpButton.Name = 'HelpButton' | ||||||
| @ -347,19 +390,19 @@ object ImageListEditorDlg: TImageListEditorDlg | |||||||
|     ShowBevel = False |     ShowBevel = False | ||||||
|   end |   end | ||||||
|   object ImageList: TImageList |   object ImageList: TImageList | ||||||
|     Left = 216 |     left = 84 | ||||||
|     Top = 246 |     top = 211 | ||||||
|   end |   end | ||||||
|   object OpenDialog: TOpenPictureDialog |   object OpenDialog: TOpenPictureDialog | ||||||
|     FilterIndex = 0 |     FilterIndex = 0 | ||||||
|     Options = [ofAllowMultiSelect, ofFileMustExist, ofEnableSizing, ofViewDetail, ofAutoPreview] |     Options = [ofAllowMultiSelect, ofFileMustExist, ofEnableSizing, ofViewDetail, ofAutoPreview] | ||||||
|     Left = 216 |     left = 84 | ||||||
|     Top = 209 |     top = 103 | ||||||
|   end |   end | ||||||
|   object SaveDialog: TSavePictureDialog |   object SaveDialog: TSavePictureDialog | ||||||
|     FilterIndex = 0 |     FilterIndex = 0 | ||||||
|     Options = [ofEnableSizing, ofViewDetail, ofAutoPreview] |     Options = [ofEnableSizing, ofViewDetail, ofAutoPreview] | ||||||
|     Left = 252 |     left = 84 | ||||||
|     Top = 209 |     top = 159 | ||||||
|   end |   end | ||||||
| end | end | ||||||
|  | |||||||
| @ -86,6 +86,7 @@ type | |||||||
|     procedure FormClose(Sender: TObject; var {%H-}CloseAction: TCloseAction); |     procedure FormClose(Sender: TObject; var {%H-}CloseAction: TCloseAction); | ||||||
|     procedure FormCreate(Sender: TObject); |     procedure FormCreate(Sender: TObject); | ||||||
|     procedure btnApplyClick(Sender: TObject); |     procedure btnApplyClick(Sender: TObject); | ||||||
|  |     procedure FormShow(Sender: TObject); | ||||||
|     procedure ImageListBoxDrawItem(Control: TWinControl; Index: Integer; |     procedure ImageListBoxDrawItem(Control: TWinControl; Index: Integer; | ||||||
|       ARect: TRect; {%H-}State: TOwnerDrawState); |       ARect: TRect; {%H-}State: TOwnerDrawState); | ||||||
|     procedure btnAddNewResolutionClick(Sender: TObject); |     procedure btnAddNewResolutionClick(Sender: TObject); | ||||||
| @ -135,6 +136,23 @@ implementation | |||||||
| 
 | 
 | ||||||
| {$R *.lfm} | {$R *.lfm} | ||||||
| 
 | 
 | ||||||
|  | procedure AlignButtons(AButtons: array of TControl); | ||||||
|  | var | ||||||
|  |   Button: TControl; | ||||||
|  |   MaxWidth: Integer; | ||||||
|  | begin | ||||||
|  |   // In designer: | ||||||
|  |   // Left sides of buttons anchored to TListBox | ||||||
|  |   // Right sides of buttons are not anchored | ||||||
|  |   // Buttons, GroupBox: AutoSize=True | ||||||
|  |   MaxWidth:=0; | ||||||
|  |   for Button in AButtons do | ||||||
|  |     if Button.Width > MaxWidth then | ||||||
|  |       MaxWidth:=Button.Width; | ||||||
|  |   for Button in AButtons do | ||||||
|  |     Button.Constraints.MinWidth:=MaxWidth; | ||||||
|  | end; | ||||||
|  | 
 | ||||||
| function EditImageList(AImageList: TImageList): Boolean; | function EditImageList(AImageList: TImageList): Boolean; | ||||||
| var | var | ||||||
|   ImageListEditorDlg: TImageListEditorDlg; |   ImageListEditorDlg: TImageListEditorDlg; | ||||||
| @ -594,6 +612,23 @@ begin | |||||||
|   SaveToImageList; |   SaveToImageList; | ||||||
| end; | end; | ||||||
| 
 | 
 | ||||||
|  | procedure TImageListEditorDlg.FormShow(Sender: TObject); | ||||||
|  | begin | ||||||
|  |   AlignButtons([ | ||||||
|  |     BtnAdd, | ||||||
|  |     BtnAddMoreResolutions, | ||||||
|  |     BtnReplace, | ||||||
|  |     BtnReplaceAll, | ||||||
|  |     BtnDelete, | ||||||
|  |     BtnClear, | ||||||
|  |     BtnMoveUp, | ||||||
|  |     BtnMoveDown, | ||||||
|  |     BtnSave, | ||||||
|  |     btnSaveAll, | ||||||
|  |     btnAddNewResolution, | ||||||
|  |     btnDeleteResolution]); | ||||||
|  | end; | ||||||
|  | 
 | ||||||
| procedure TImageListEditorDlg.UpdatePreviewImage; | procedure TImageListEditorDlg.UpdatePreviewImage; | ||||||
|   procedure DisablePreview; |   procedure DisablePreview; | ||||||
|   begin |   begin | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 juha
						juha