You've already forked lazarus-ccr
tvplanit: DPI-aware report setup dialog of fulldemo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5075 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -2,11 +2,11 @@ object frmReportSetup: TfrmReportSetup
|
||||
Left = 380
|
||||
Height = 138
|
||||
Top = 138
|
||||
Width = 254
|
||||
Width = 291
|
||||
BorderStyle = bsDialog
|
||||
Caption = 'Report Setup'
|
||||
ClientHeight = 138
|
||||
ClientWidth = 254
|
||||
ClientWidth = 291
|
||||
Color = clBtnFace
|
||||
Font.Color = clWindowText
|
||||
OnCreate = FormCreate
|
||||
@ -41,7 +41,7 @@ object frmReportSetup: TfrmReportSetup
|
||||
ParentColor = False
|
||||
end
|
||||
object btnOK: TButton
|
||||
Left = 90
|
||||
Left = 128
|
||||
Height = 25
|
||||
Top = 104
|
||||
Width = 75
|
||||
@ -51,7 +51,7 @@ object frmReportSetup: TfrmReportSetup
|
||||
TabOrder = 3
|
||||
end
|
||||
object btnCancel: TButton
|
||||
Left = 170
|
||||
Left = 208
|
||||
Height = 25
|
||||
Top = 104
|
||||
Width = 75
|
||||
@ -64,7 +64,7 @@ object frmReportSetup: TfrmReportSetup
|
||||
Left = 76
|
||||
Height = 23
|
||||
Top = 72
|
||||
Width = 169
|
||||
Width = 207
|
||||
ItemHeight = 15
|
||||
Sorted = True
|
||||
TabOrder = 2
|
||||
@ -73,10 +73,8 @@ object frmReportSetup: TfrmReportSetup
|
||||
Left = 76
|
||||
Height = 23
|
||||
Top = 12
|
||||
Width = 171
|
||||
Width = 207
|
||||
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
|
||||
OKCaption = 'OK'
|
||||
CancelCaption = 'Cancel'
|
||||
DateOrder = doNone
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 1
|
||||
@ -87,10 +85,8 @@ object frmReportSetup: TfrmReportSetup
|
||||
Left = 76
|
||||
Height = 23
|
||||
Top = 36
|
||||
Width = 171
|
||||
Width = 207
|
||||
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
|
||||
OKCaption = 'OK'
|
||||
CancelCaption = 'Cancel'
|
||||
DateOrder = doNone
|
||||
ButtonWidth = 23
|
||||
NumGlyphs = 1
|
||||
|
@ -123,8 +123,23 @@ procedure TfrmReportSetup.PositionControls;
|
||||
var
|
||||
w: Integer;
|
||||
delta: Integer = 8;
|
||||
vdist: Integer = 4;
|
||||
editHeight: Integer;
|
||||
buttonHeight: Integer;
|
||||
begin
|
||||
delta := ScaleX(8, DesignTimeDPI);
|
||||
vdist := ScaleY(4, DesignTimeDPI);
|
||||
buttonHeight := ScaleY(btnOK.Height, DesignTimeDPI);
|
||||
|
||||
with TEdit.Create(nil) do
|
||||
try
|
||||
Parent := self;
|
||||
editHeight := Height;
|
||||
finally
|
||||
Free;
|
||||
end;
|
||||
|
||||
// horizontal
|
||||
w := Maxvalue([GetLabelWidth(lblStartDate), GetLabelWidth(lblEndDate), GetLabelWidth(lblFormat)]);
|
||||
edStartDate.Left := delta + w + delta;
|
||||
lblStartDate.Left := edStartDate.Left - delta - GetLabelWidth(lblStartDate);
|
||||
@ -139,6 +154,26 @@ begin
|
||||
btnCancel.Width := w;
|
||||
btnCancel.Left := ClientWidth - delta - w;
|
||||
btnOK.Left := btnCancel.Left - delta - w;
|
||||
|
||||
// vertical
|
||||
edStartdate.Height := editHeight;
|
||||
edEndDate.Height := editHeight;
|
||||
edStartDate.ButtonWidth := editHeight;
|
||||
edEndDate.ButtonWidth := editHeight;
|
||||
|
||||
edEndDate.Top := BottomOf(edStartDate) + vdist;
|
||||
lblStartDate.Top := edStartDate.Top + (edStartDate.Height - lblStartDate.Height) div 2;
|
||||
lblEndDate.Top := edEndDate.Top + (edEndDate.Height - lblEndDate.Height) div 2;
|
||||
|
||||
VpPrintFormatCombobox1.Top := Bottomof(edEndDate) + 2*vdist;
|
||||
lblFormat.Top := VpPrintFormatCombobox1.Top + (VpPrintFormatCombobox1.Height - lblFormat.Height) div 2;
|
||||
|
||||
btnOK.Top := BottomOf(VpPrintFormatCombobox1) + 2*vdist;
|
||||
btnCancel.Top := btnOK.Top;
|
||||
btnOK.Height := buttonHeight;
|
||||
btnCancel.Height := buttonHeight;
|
||||
|
||||
ClientHeight := BottomOf(btnOK) + delta;
|
||||
end;
|
||||
|
||||
procedure TfrmReportSetup.SaveData(out ReportData: TReportDataRec);
|
||||
|
@ -159,26 +159,6 @@ msgstr "OK"
|
||||
msgid "Report Setup"
|
||||
msgstr "Ausdruck einrichten"
|
||||
|
||||
#: tfrmreportsetup.edenddate.cancelcaption
|
||||
msgctxt "tfrmreportsetup.edenddate.cancelcaption"
|
||||
msgid "Cancel"
|
||||
msgstr "Abbrechen"
|
||||
|
||||
#: tfrmreportsetup.edenddate.okcaption
|
||||
msgctxt "tfrmreportsetup.edenddate.okcaption"
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: tfrmreportsetup.edstartdate.cancelcaption
|
||||
msgctxt "tfrmreportsetup.edstartdate.cancelcaption"
|
||||
msgid "Cancel"
|
||||
msgstr "Abbrechen"
|
||||
|
||||
#: tfrmreportsetup.edstartdate.okcaption
|
||||
msgctxt "tfrmreportsetup.edstartdate.okcaption"
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: tfrmreportsetup.lblenddate.caption
|
||||
msgctxt "tfrmreportsetup.lblenddate.caption"
|
||||
msgid "End Date:"
|
||||
@ -322,3 +302,4 @@ msgstr "Fertiggestellte Aufgaben ausblenden"
|
||||
#: tmainform.titlelbl.caption
|
||||
msgid "TitleLbl"
|
||||
msgstr ""
|
||||
|
||||
|
@ -150,30 +150,6 @@ msgstr "OK"
|
||||
msgid "Report Setup"
|
||||
msgstr "Overzicht Instellingen"
|
||||
|
||||
#: tfrmreportsetup.edenddate.cancelcaption
|
||||
#, fuzzy
|
||||
msgctxt "tfrmreportsetup.edenddate.cancelcaption"
|
||||
msgid "Cancel"
|
||||
msgstr "Annuleren"
|
||||
|
||||
#: tfrmreportsetup.edenddate.okcaption
|
||||
#, fuzzy
|
||||
msgctxt "tfrmreportsetup.edenddate.okcaption"
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: tfrmreportsetup.edstartdate.cancelcaption
|
||||
#, fuzzy
|
||||
msgctxt "tfrmreportsetup.edstartdate.cancelcaption"
|
||||
msgid "Cancel"
|
||||
msgstr "Annuleren"
|
||||
|
||||
#: tfrmreportsetup.edstartdate.okcaption
|
||||
#, fuzzy
|
||||
msgctxt "tfrmreportsetup.edstartdate.okcaption"
|
||||
msgid "OK"
|
||||
msgstr "OK"
|
||||
|
||||
#: tfrmreportsetup.lblenddate.caption
|
||||
#, fuzzy
|
||||
msgctxt "tfrmreportsetup.lblenddate.caption"
|
||||
|
@ -148,26 +148,6 @@ msgstr ""
|
||||
msgid "Report Setup"
|
||||
msgstr ""
|
||||
|
||||
#: tfrmreportsetup.edenddate.cancelcaption
|
||||
msgctxt "tfrmreportsetup.edenddate.cancelcaption"
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: tfrmreportsetup.edenddate.okcaption
|
||||
msgctxt "tfrmreportsetup.edenddate.okcaption"
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: tfrmreportsetup.edstartdate.cancelcaption
|
||||
msgctxt "tfrmreportsetup.edstartdate.cancelcaption"
|
||||
msgid "Cancel"
|
||||
msgstr ""
|
||||
|
||||
#: tfrmreportsetup.edstartdate.okcaption
|
||||
msgctxt "tfrmreportsetup.edstartdate.okcaption"
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: tfrmreportsetup.lblenddate.caption
|
||||
msgctxt "tfrmreportsetup.lblenddate.caption"
|
||||
msgid "End Date:"
|
||||
|
@ -159,28 +159,6 @@ msgstr ""
|
||||
msgid "Report Setup"
|
||||
msgstr "Параметры отчёта"
|
||||
|
||||
#: tfrmreportsetup.edenddate.cancelcaption
|
||||
#, fuzzy
|
||||
msgctxt "tfrmreportsetup.edenddate.cancelcaption"
|
||||
msgid "Cancel"
|
||||
msgstr "Отмена"
|
||||
|
||||
#: tfrmreportsetup.edenddate.okcaption
|
||||
msgctxt "tfrmreportsetup.edenddate.okcaption"
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: tfrmreportsetup.edstartdate.cancelcaption
|
||||
#, fuzzy
|
||||
msgctxt "tfrmreportsetup.edstartdate.cancelcaption"
|
||||
msgid "Cancel"
|
||||
msgstr "Отмена"
|
||||
|
||||
#: tfrmreportsetup.edstartdate.okcaption
|
||||
msgctxt "tfrmreportsetup.edstartdate.okcaption"
|
||||
msgid "OK"
|
||||
msgstr ""
|
||||
|
||||
#: tfrmreportsetup.lblenddate.caption
|
||||
#, fuzzy
|
||||
msgctxt "tfrmreportsetup.lblenddate.caption"
|
||||
|
Reference in New Issue
Block a user