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:
wp_xxyyzz
2016-07-13 22:07:36 +00:00
parent aba9d82e27
commit f51e3d26b3
2 changed files with 10 additions and 4 deletions

View File

@ -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

View File

@ -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;
{=====}