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:
File diff suppressed because it is too large
Load Diff
@ -59,9 +59,11 @@ type
|
|||||||
|
|
||||||
TDlgEventEdit = class(TForm)
|
TDlgEventEdit = class(TForm)
|
||||||
AlarmAdvance: TEdit;
|
AlarmAdvance: TEdit;
|
||||||
|
Bevel4: TBevel;
|
||||||
LocationEdit: TEdit;
|
LocationEdit: TEdit;
|
||||||
LocationLbl: TLabel;
|
LocationLbl: TLabel;
|
||||||
NotesMemo: TMemo;
|
NotesMemo: TMemo;
|
||||||
|
Panel1: TPanel;
|
||||||
StartDate: TDateEdit;
|
StartDate: TDateEdit;
|
||||||
EndDate: TDateEdit;
|
EndDate: TDateEdit;
|
||||||
RepeatUntil: TDateEdit;
|
RepeatUntil: TDateEdit;
|
||||||
@ -199,8 +201,6 @@ end;
|
|||||||
{ TDlgEventEdit }
|
{ TDlgEventEdit }
|
||||||
|
|
||||||
procedure TDlgEventEdit.FormCreate(Sender: TObject);
|
procedure TDlgEventEdit.FormCreate(Sender: TObject);
|
||||||
var
|
|
||||||
h: Integer;
|
|
||||||
begin
|
begin
|
||||||
{$IFDEF LCL}
|
{$IFDEF LCL}
|
||||||
StartTime := TTimeEdit.Create(self);
|
StartTime := TTimeEdit.Create(self);
|
||||||
@ -247,14 +247,6 @@ begin
|
|||||||
TabOrder := edtUnusedPlaceholder.TabOrder;
|
TabOrder := edtUnusedPlaceholder.TabOrder;
|
||||||
end;
|
end;
|
||||||
IntervalUpDown.Associate := FCustomInterval;
|
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;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
@ -621,8 +613,16 @@ const
|
|||||||
VDIST = 5;
|
VDIST = 5;
|
||||||
VBEVELDIST = 8;
|
VBEVELDIST = 8;
|
||||||
var
|
var
|
||||||
w: Integer;
|
w, h: Integer;
|
||||||
begin
|
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 ***
|
// *** Horizontal positions ***
|
||||||
|
|
||||||
// Position controls according to label widths
|
// Position controls according to label widths
|
||||||
@ -727,9 +727,17 @@ begin
|
|||||||
|
|
||||||
AppointmentGroupbox.ClientHeight := BottomOf(AlarmAdvance) + VBEVELDIST;
|
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;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user