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
|
||||
object Category: TComboBox
|
||||
Left = 484
|
||||
Height = 21
|
||||
Height = 23
|
||||
Top = 40
|
||||
Width = 180
|
||||
ItemHeight = 15
|
||||
OnDrawItem = CategoryDrawItem
|
||||
ReadOnly = True
|
||||
Style = csOwnerDrawFixed
|
||||
TabOrder = 2
|
||||
end
|
||||
object RecurringType: TComboBox
|
||||
|
@ -199,6 +199,8 @@ end;
|
||||
{ TDlgEventEdit }
|
||||
|
||||
procedure TDlgEventEdit.FormCreate(Sender: TObject);
|
||||
var
|
||||
h: Integer;
|
||||
begin
|
||||
{$IFDEF LCL}
|
||||
StartTime := TTimeEdit.Create(self);
|
||||
@ -246,7 +248,13 @@ begin
|
||||
end;
|
||||
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;
|
||||
{=====}
|
||||
|
||||
|
Reference in New Issue
Block a user