浏览代码

UDP: COCOA: more suitable ClientHeight of autocomplete window (#592)

rich2014 3 年之前
父节点
当前提交
135eff3413
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      components/KASToolBar/kaspathedit.pas

+ 4 - 0
components/KASToolBar/kaspathedit.pas

@@ -259,10 +259,14 @@ begin
         I:= Bottom - Top; // TListBox.ItemHeight sometimes don't work under GTK2
         with FListBox do
         begin
+{$IF NOT DEFINED(LCLCOCOA)}
           if Items.Count = 1 then
             FPanel.ClientHeight:= Self.Height
           else
             FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1);
+{$ELSE}
+          FPanel.ClientHeight:= I * IfThen(Items.Count > 10, 11, Items.Count + 1) + trunc(i/2);
+{$ENDIF}
         end;
       end;
     end;