IDE: viewunit_dlg, inc height of item by 2px if itemheight <= ideimages16

git-svn-id: trunk@53824 -
This commit is contained in:
zeljko 2017-01-01 11:45:54 +00:00
parent 3f8a24ce5b
commit 29e4421f5a
2 changed files with 19 additions and 9 deletions

View File

@ -19,8 +19,8 @@ object ViewUnitDialog: TViewUnitDialog
LCLVersion = '1.7'
object Listbox: TListBox
Left = 6
Height = 267
Top = 44
Height = 272
Top = 41
Width = 366
Align = alClient
BorderSpacing.Around = 6
@ -29,14 +29,15 @@ object ViewUnitDialog: TViewUnitDialog
OnDblClick = OKButtonClick
OnDrawItem = ListboxDrawItem
OnKeyPress = ListboxKeyPress
OnMeasureItem = ListboxMeasureItem
PopupMenu = popListBox
Style = lbOwnerDrawFixed
TabOrder = 1
end
object ButtonPanel: TButtonPanel
Left = 6
Height = 37
Top = 343
Height = 35
Top = 345
Width = 366
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
@ -55,19 +56,19 @@ object ViewUnitDialog: TViewUnitDialog
end
object BtnPanel: TPanel
Left = 6
Height = 32
Height = 29
Top = 6
Width = 366
Align = alTop
AutoSize = True
BorderSpacing.Around = 6
BevelOuter = bvNone
ClientHeight = 32
ClientHeight = 29
ClientWidth = 366
TabOrder = 0
object SortAlphabeticallySpeedButton: TSpeedButton
Left = 0
Height = 32
Height = 29
Top = 0
Width = 25
Align = alLeft
@ -81,7 +82,7 @@ object ViewUnitDialog: TViewUnitDialog
end
object FilterEdit: TListFilterEdit
Left = 31
Height = 32
Height = 29
Top = 0
Width = 335
ButtonWidth = 23
@ -97,7 +98,7 @@ object ViewUnitDialog: TViewUnitDialog
object ProgressBar1: TProgressBar
Left = 6
Height = 20
Top = 317
Top = 319
Width = 366
Align = alBottom
BorderSpacing.Left = 6

View File

@ -117,6 +117,8 @@ type
procedure ListboxDrawItem({%H-}Control: TWinControl; Index: Integer;
ARect: TRect; {%H-}State: TOwnerDrawState);
procedure ListboxKeyPress(Sender: TObject; var Key: char);
procedure ListboxMeasureItem(Control: TWinControl; Index: Integer;
var AHeight: Integer);
procedure OnIdle(Sender: TObject; var {%H-}Done: Boolean);
procedure SortAlphabeticallySpeedButtonClick(Sender: TObject);
procedure OKButtonClick(Sender :TObject);
@ -485,6 +487,13 @@ begin
OKButtonClick(nil);
end;
procedure TViewUnitDialog.ListboxMeasureItem(Control: TWinControl;
Index: Integer; var AHeight: Integer);
begin
if AHeight <= IDEImages.Images_16.Height then
AHeight := IDEImages.Images_16.Height + 2;
end;
procedure TViewUnitDialog.MultiselectCheckBoxClick(Sender :TObject);
begin
ListBox.Multiselect := mniMultiSelect.Checked;