forked from geraldholdsworth/DiscImageManager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImageDetailUnit.pas
executable file
·120 lines (100 loc) · 2.89 KB
/
ImageDetailUnit.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
unit ImageDetailUnit;
{
Copyright (C) 2018-2024 Gerald Holdsworth [email protected]
This source is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public Licence as published by the Free
Software Foundation; either version 3 of the Licence, or (at your option)
any later version.
This code is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public Licence for more
details.
A copy of the GNU General Public Licence is available on the World Wide Web
at <http://www.gnu.org/copyleft/gpl.html>. You can also obtain it by writing
to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
Boston, MA 02110-1335, USA.
}
{$mode objfpc}{$H+}
interface
uses
Classes,SysUtils,Forms,Controls,Graphics,Dialogs,ExtCtrls,StdCtrls,
GJHCustomComponents;
type
{ TImageDetailForm }
TImageDetailForm = class(TForm)
cbInterleave: TComboBox;
pnSide1: TPanel;
pnSide0Caption: TLabel;
MicrosoftLogo: TImage;
cbBootOption0: TComboBox;
cbBootOption1: TComboBox;
DirLabel: TLabel;
DirPanel: TPanel;
AcornLogo: TImage;
AmigaLogo: TImage;
CommodoreLogo: TImage;
lbInterleave: TLabel;
InterleaveLabel: TLabel;
InterleavePanel: TPanel;
pnSide0: TPanel;
pnSide1Caption: TLabel;
SinclairLogo: TImage;
lbDirType: TLabel;
MapLabel: TLabel;
MapPanel: TPanel;
FormatLabel: TLabel;
FormatPanel: TPanel;
edDiscTitle0: TEdit;
edDiscTitle1: TEdit;
DiscName0Label: TLabel;
CRC32Label: TLabel;
lbCRC32: TLabel;
lbBootOption0: TLabel;
DiscName1Label: TLabel;
lbBootOption1: TLabel;
CRCPanel: TPanel;
lbMap: TLabel;
lbImgFormat: TLabel;
FreeLabel: TLabel;
BBCMasterLogo: TImage;
SystemLabel: TLabel;
DirectoryLabel: TLabel;
FileLabel: TLabel;
LegendLabel: TLabel;
Legend: TPanel;
colFree: TShape;
colSystem: TShape;
colDir: TShape;
colFile: TShape;
btn_OK,
btn_Cancel: TGJHButton;
procedure FormCreate(Sender: TObject);
procedure LegendPaint(Sender: TObject);
private
public
end;
var
ImageDetailForm: TImageDetailForm;
implementation
{$R *.lfm}
uses MainUnit;
{ TImageDetailForm }
procedure TImageDetailForm.LegendPaint(Sender: TObject);
begin
MainForm.FileInfoPanelPaint(Sender);
end;
procedure TImageDetailForm.FormCreate(Sender: TObject);
var
ratio: Real;
begin
ratio:=PixelsPerInch/DesignTimePPI;
btn_OK:=MainForm.CreateButton(Legend as TControl,'Update',True,0,0,mrOK);
btn_Cancel:=MainForm.CreateButton(Legend as TControl,'Cancel',False,0,0,mrCancel);
btn_OK.Width:=(Legend.ClientWidth div 2)-Round(16*ratio);
btn_Cancel.Width:=btn_OK.Width-Round(8*ratio);
btn_OK.Top:=LegendLabel.Top-Round(8*ratio)-btn_OK.Height;
btn_OK.Left:=Legend.ClientWidth-Round(8*ratio)-btn_OK.Width;
btn_Cancel.Top:=btn_OK.Top+Round(4*ratio);
btn_Cancel.Left:=Round(8*ratio);
end;
end.