You've already forked lazarus-ccr
tvplanit: Again - fix height of category combobox in event editor at 120 dpi.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4945 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -286,13 +286,11 @@ object DlgEventEdit: TDlgEventEdit
|
|||||||
end
|
end
|
||||||
object Category: TComboBox
|
object Category: TComboBox
|
||||||
Left = 484
|
Left = 484
|
||||||
Height = 21
|
Height = 23
|
||||||
Top = 40
|
Top = 40
|
||||||
Width = 180
|
Width = 180
|
||||||
ItemHeight = 15
|
ItemHeight = 15
|
||||||
OnDrawItem = CategoryDrawItem
|
OnDrawItem = CategoryDrawItem
|
||||||
ReadOnly = True
|
|
||||||
Style = csOwnerDrawFixed
|
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
object RecurringType: TComboBox
|
object RecurringType: TComboBox
|
||||||
|
@ -199,6 +199,8 @@ 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);
|
||||||
@ -246,7 +248,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
IntervalUpDown.Associate := FCustomInterval;
|
IntervalUpDown.Associate := FCustomInterval;
|
||||||
|
|
||||||
Category.ItemHeight := LocationEdit.Height - 6;
|
// 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;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user