You've already forked lazarus-ccr
tvplanit: Some more improvements in vertical control positioning in event editor.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4955 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
object DlgEventEdit: TDlgEventEdit
|
||||
Left = 417
|
||||
Height = 388
|
||||
Height = 422
|
||||
Top = 211
|
||||
Width = 697
|
||||
BorderStyle = bsToolWindow
|
||||
Caption = 'Add / Edit Events'
|
||||
ClientHeight = 388
|
||||
ClientHeight = 422
|
||||
ClientWidth = 697
|
||||
Constraints.MinHeight = 378
|
||||
Constraints.MinWidth = 594
|
||||
@ -16,13 +16,13 @@ object DlgEventEdit: TDlgEventEdit
|
||||
object ButtonPanel: TPanel
|
||||
Left = 0
|
||||
Height = 36
|
||||
Top = 352
|
||||
Top = 386
|
||||
Width = 697
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 36
|
||||
ClientWidth = 697
|
||||
TabOrder = 2
|
||||
TabOrder = 0
|
||||
object ResourceNameLbl: TLabel
|
||||
Left = 8
|
||||
Height = 16
|
||||
@ -62,15 +62,26 @@ object DlgEventEdit: TDlgEventEdit
|
||||
TabStop = False
|
||||
end
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 386
|
||||
Top = 0
|
||||
Width = 697
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
BorderWidth = 8
|
||||
ClientHeight = 386
|
||||
ClientWidth = 697
|
||||
TabOrder = 1
|
||||
object AppointmentGroupBox: TGroupBox
|
||||
Left = 8
|
||||
Height = 218
|
||||
Top = 5
|
||||
Width = 679
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
Height = 224
|
||||
Top = 8
|
||||
Width = 681
|
||||
Align = alTop
|
||||
Caption = 'Appointment'
|
||||
ClientHeight = 198
|
||||
ClientWidth = 675
|
||||
ClientHeight = 204
|
||||
ClientWidth = 677
|
||||
TabOrder = 0
|
||||
object DescriptionLbl: TLabel
|
||||
Left = 5
|
||||
@ -84,7 +95,7 @@ object DlgEventEdit: TDlgEventEdit
|
||||
Left = 8
|
||||
Height = 2
|
||||
Top = 70
|
||||
Width = 659
|
||||
Width = 661
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
Shape = bsTopLine
|
||||
end
|
||||
@ -92,7 +103,7 @@ object DlgEventEdit: TDlgEventEdit
|
||||
Left = 8
|
||||
Height = 2
|
||||
Top = 160
|
||||
Width = 659
|
||||
Width = 661
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
Shape = bsTopLine
|
||||
end
|
||||
@ -207,7 +218,7 @@ object DlgEventEdit: TDlgEventEdit
|
||||
}
|
||||
end
|
||||
object SoundFinderBtn: TSpeedButton
|
||||
Left = 312
|
||||
Left = 328
|
||||
Height = 22
|
||||
Top = 167
|
||||
Width = 23
|
||||
@ -272,7 +283,7 @@ object DlgEventEdit: TDlgEventEdit
|
||||
Left = 86
|
||||
Height = 23
|
||||
Top = 11
|
||||
Width = 578
|
||||
Width = 580
|
||||
Anchors = [akTop, akLeft, akRight]
|
||||
TabOrder = 0
|
||||
Text = 'DescriptionEdit'
|
||||
@ -322,7 +333,7 @@ object DlgEventEdit: TDlgEventEdit
|
||||
Left = 231
|
||||
Height = 23
|
||||
Top = 167
|
||||
Width = 77
|
||||
Width = 93
|
||||
ItemHeight = 15
|
||||
Style = csDropDownList
|
||||
TabOrder = 13
|
||||
@ -536,13 +547,22 @@ object DlgEventEdit: TDlgEventEdit
|
||||
end
|
||||
object NotesMemo: TMemo
|
||||
Left = 8
|
||||
Height = 105
|
||||
Top = 232
|
||||
Width = 679
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
Height = 138
|
||||
Top = 240
|
||||
Width = 681
|
||||
Align = alClient
|
||||
ScrollBars = ssVertical
|
||||
TabOrder = 1
|
||||
end
|
||||
object Bevel4: TBevel
|
||||
Left = 8
|
||||
Height = 8
|
||||
Top = 232
|
||||
Width = 681
|
||||
Align = alTop
|
||||
Shape = bsSpacer
|
||||
end
|
||||
end
|
||||
object FileDialog: TOpenDialog
|
||||
left = 320
|
||||
top = 256
|
||||
|
@ -59,9 +59,11 @@ type
|
||||
|
||||
TDlgEventEdit = class(TForm)
|
||||
AlarmAdvance: TEdit;
|
||||
Bevel4: TBevel;
|
||||
LocationEdit: TEdit;
|
||||
LocationLbl: TLabel;
|
||||
NotesMemo: TMemo;
|
||||
Panel1: TPanel;
|
||||
StartDate: TDateEdit;
|
||||
EndDate: TDateEdit;
|
||||
RepeatUntil: TDateEdit;
|
||||
@ -199,8 +201,6 @@ end;
|
||||
{ TDlgEventEdit }
|
||||
|
||||
procedure TDlgEventEdit.FormCreate(Sender: TObject);
|
||||
var
|
||||
h: Integer;
|
||||
begin
|
||||
{$IFDEF LCL}
|
||||
StartTime := TTimeEdit.Create(self);
|
||||
@ -247,14 +247,6 @@ begin
|
||||
TabOrder := edtUnusedPlaceholder.TabOrder;
|
||||
end;
|
||||
IntervalUpDown.Associate := FCustomInterval;
|
||||
|
||||
// This is needed as workaround for the combobox height at higher dpi.
|
||||
// We design it with Style csDropdown where the height is correct, and then
|
||||
// use the corresponding, correct ItemHeight after switching to csOwnerDrawFixed
|
||||
// (which is needed to draw the color boxes).
|
||||
h := Category.ItemHeight;
|
||||
Category.Style := csOwnerDrawFixed;
|
||||
Category.ItemHeight := h;
|
||||
end;
|
||||
{=====}
|
||||
|
||||
@ -621,8 +613,16 @@ const
|
||||
VDIST = 5;
|
||||
VBEVELDIST = 8;
|
||||
var
|
||||
w: Integer;
|
||||
w, h: Integer;
|
||||
begin
|
||||
// This is needed as workaround for the combobox height at higher dpi.
|
||||
// We design it with Style csDropdown where the height is correct, and then
|
||||
// use the corresponding, correct ItemHeight after switching to csOwnerDrawFixed
|
||||
// (which is needed to draw the color boxes).
|
||||
h := Category.ItemHeight;
|
||||
Category.Style := csOwnerDrawFixed;
|
||||
Category.ItemHeight := h+1;
|
||||
|
||||
// *** Horizontal positions ***
|
||||
|
||||
// Position controls according to label widths
|
||||
@ -727,9 +727,17 @@ begin
|
||||
|
||||
AppointmentGroupbox.ClientHeight := BottomOf(AlarmAdvance) + VBEVELDIST;
|
||||
|
||||
NotesMemo.Top := BottomOf(AppointmentGroupbox) + VBEVELDIST;
|
||||
OKBtn.Width := Max(GetButtonWidth(OKBtn), GetButtonWidth(CancelBtn));
|
||||
CancelBtn.Width := OKBtn.Width;
|
||||
CancelBtn.Left := ButtonPanel.ClientWidth - ResourcenameLbl.Left - CancelBtn.Width;
|
||||
OKBtn.Left := CancelBtn.Left - DELTA - OKBtn.Width;
|
||||
ResourceNameLbl.Top := (ButtonPanel.ClientHeight - Panel1.BorderWidth - ResourceNameLbl.Height) div 2;
|
||||
OKBtn.Top := (ButtonPanel.ClientHeight - Panel1.BorderWidth - OKBtn.Height) div 2;
|
||||
CancelBtn.Top := OKBtn.Top;
|
||||
|
||||
ClientHeight := BottomOf(NotesMemo) + VBEVELDIST + ButtonPanel.Height;
|
||||
// NotesMemo.Top := BottomOf(AppointmentGroupbox) + VBEVELDIST;
|
||||
|
||||
// ClientHeight := BottomOf(NotesMemo) + VBEVELDIST + ButtonPanel.Height;
|
||||
end;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user