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
|
Left = 380
|
||||||
Height = 138
|
Height = 138
|
||||||
Top = 138
|
Top = 138
|
||||||
Width = 254
|
Width = 291
|
||||||
BorderStyle = bsDialog
|
BorderStyle = bsDialog
|
||||||
Caption = 'Report Setup'
|
Caption = 'Report Setup'
|
||||||
ClientHeight = 138
|
ClientHeight = 138
|
||||||
ClientWidth = 254
|
ClientWidth = 291
|
||||||
Color = clBtnFace
|
Color = clBtnFace
|
||||||
Font.Color = clWindowText
|
Font.Color = clWindowText
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
@ -41,7 +41,7 @@ object frmReportSetup: TfrmReportSetup
|
|||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object btnOK: TButton
|
object btnOK: TButton
|
||||||
Left = 90
|
Left = 128
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 104
|
Top = 104
|
||||||
Width = 75
|
Width = 75
|
||||||
@ -51,7 +51,7 @@ object frmReportSetup: TfrmReportSetup
|
|||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
object btnCancel: TButton
|
object btnCancel: TButton
|
||||||
Left = 170
|
Left = 208
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 104
|
Top = 104
|
||||||
Width = 75
|
Width = 75
|
||||||
@ -64,7 +64,7 @@ object frmReportSetup: TfrmReportSetup
|
|||||||
Left = 76
|
Left = 76
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 72
|
Top = 72
|
||||||
Width = 169
|
Width = 207
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
Sorted = True
|
Sorted = True
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
@ -73,10 +73,8 @@ object frmReportSetup: TfrmReportSetup
|
|||||||
Left = 76
|
Left = 76
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 12
|
Top = 12
|
||||||
Width = 171
|
Width = 207
|
||||||
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
|
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
|
||||||
OKCaption = 'OK'
|
|
||||||
CancelCaption = 'Cancel'
|
|
||||||
DateOrder = doNone
|
DateOrder = doNone
|
||||||
ButtonWidth = 23
|
ButtonWidth = 23
|
||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
@ -87,10 +85,8 @@ object frmReportSetup: TfrmReportSetup
|
|||||||
Left = 76
|
Left = 76
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 36
|
Top = 36
|
||||||
Width = 171
|
Width = 207
|
||||||
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
|
CalendarDisplaySettings = [dsShowHeadings, dsShowDayNames]
|
||||||
OKCaption = 'OK'
|
|
||||||
CancelCaption = 'Cancel'
|
|
||||||
DateOrder = doNone
|
DateOrder = doNone
|
||||||
ButtonWidth = 23
|
ButtonWidth = 23
|
||||||
NumGlyphs = 1
|
NumGlyphs = 1
|
||||||
|
@ -123,8 +123,23 @@ procedure TfrmReportSetup.PositionControls;
|
|||||||
var
|
var
|
||||||
w: Integer;
|
w: Integer;
|
||||||
delta: Integer = 8;
|
delta: Integer = 8;
|
||||||
|
vdist: Integer = 4;
|
||||||
|
editHeight: Integer;
|
||||||
|
buttonHeight: Integer;
|
||||||
begin
|
begin
|
||||||
delta := ScaleX(8, DesignTimeDPI);
|
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)]);
|
w := Maxvalue([GetLabelWidth(lblStartDate), GetLabelWidth(lblEndDate), GetLabelWidth(lblFormat)]);
|
||||||
edStartDate.Left := delta + w + delta;
|
edStartDate.Left := delta + w + delta;
|
||||||
lblStartDate.Left := edStartDate.Left - delta - GetLabelWidth(lblStartDate);
|
lblStartDate.Left := edStartDate.Left - delta - GetLabelWidth(lblStartDate);
|
||||||
@ -139,6 +154,26 @@ begin
|
|||||||
btnCancel.Width := w;
|
btnCancel.Width := w;
|
||||||
btnCancel.Left := ClientWidth - delta - w;
|
btnCancel.Left := ClientWidth - delta - w;
|
||||||
btnOK.Left := btnCancel.Left - 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;
|
end;
|
||||||
|
|
||||||
procedure TfrmReportSetup.SaveData(out ReportData: TReportDataRec);
|
procedure TfrmReportSetup.SaveData(out ReportData: TReportDataRec);
|
||||||
|
@ -159,26 +159,6 @@ msgstr "OK"
|
|||||||
msgid "Report Setup"
|
msgid "Report Setup"
|
||||||
msgstr "Ausdruck einrichten"
|
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
|
#: tfrmreportsetup.lblenddate.caption
|
||||||
msgctxt "tfrmreportsetup.lblenddate.caption"
|
msgctxt "tfrmreportsetup.lblenddate.caption"
|
||||||
msgid "End Date:"
|
msgid "End Date:"
|
||||||
@ -322,3 +302,4 @@ msgstr "Fertiggestellte Aufgaben ausblenden"
|
|||||||
#: tmainform.titlelbl.caption
|
#: tmainform.titlelbl.caption
|
||||||
msgid "TitleLbl"
|
msgid "TitleLbl"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
@ -150,30 +150,6 @@ msgstr "OK"
|
|||||||
msgid "Report Setup"
|
msgid "Report Setup"
|
||||||
msgstr "Overzicht Instellingen"
|
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
|
#: tfrmreportsetup.lblenddate.caption
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgctxt "tfrmreportsetup.lblenddate.caption"
|
msgctxt "tfrmreportsetup.lblenddate.caption"
|
||||||
|
@ -148,26 +148,6 @@ msgstr ""
|
|||||||
msgid "Report Setup"
|
msgid "Report Setup"
|
||||||
msgstr ""
|
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
|
#: tfrmreportsetup.lblenddate.caption
|
||||||
msgctxt "tfrmreportsetup.lblenddate.caption"
|
msgctxt "tfrmreportsetup.lblenddate.caption"
|
||||||
msgid "End Date:"
|
msgid "End Date:"
|
||||||
|
@ -159,28 +159,6 @@ msgstr ""
|
|||||||
msgid "Report Setup"
|
msgid "Report Setup"
|
||||||
msgstr "Параметры отчёта"
|
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
|
#: tfrmreportsetup.lblenddate.caption
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgctxt "tfrmreportsetup.lblenddate.caption"
|
msgctxt "tfrmreportsetup.lblenddate.caption"
|
||||||
|
Reference in New Issue
Block a user