From 3f8a24ce5bf6237acf165b705b83d99e855f6273 Mon Sep 17 00:00:00 2001 From: zeljko Date: Sun, 1 Jan 2017 11:32:28 +0000 Subject: [PATCH] IDE: useunitdlg, make item height 2px bigger than 16px ide images. git-svn-id: trunk@53823 - --- ide/useunitdlg.lfm | 20 ++++++++++---------- ide/useunitdlg.pas | 9 +++++++++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ide/useunitdlg.lfm b/ide/useunitdlg.lfm index 98e5d23ced..93fc1f9592 100644 --- a/ide/useunitdlg.lfm +++ b/ide/useunitdlg.lfm @@ -16,8 +16,8 @@ object UseUnitDialog: TUseUnitDialog LCLVersion = '1.7' object ButtonPanel1: TButtonPanel Left = 6 - Height = 26 - Top = 390 + Height = 27 + Top = 389 Width = 351 OKButton.Name = 'OKButton' OKButton.DefaultCaption = True @@ -42,7 +42,7 @@ object UseUnitDialog: TUseUnitDialog AnchorSideBottom.Control = ButtonPanel1 Left = 6 Height = 49 - Top = 335 + Top = 334 Width = 351 Anchors = [akLeft, akRight, akBottom] AutoFill = True @@ -57,7 +57,7 @@ object UseUnitDialog: TUseUnitDialog ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.ControlsPerLine = 2 - ClientHeight = 29 + ClientHeight = 22 ClientWidth = 347 Columns = 2 ItemIndex = 0 @@ -75,7 +75,7 @@ object UseUnitDialog: TUseUnitDialog AnchorSideRight.Side = asrBottom AnchorSideBottom.Control = AllUnitsCheckBox Left = 6 - Height = 272 + Height = 270 Top = 32 Width = 351 Anchors = [akTop, akLeft, akRight, akBottom] @@ -84,7 +84,7 @@ object UseUnitDialog: TUseUnitDialog OnDblClick = UnitsListBoxDblClick OnDrawItem = UnitsListBoxDrawItem OnKeyDown = UnitsListBoxKeyDown - ScrollWidth = 349 + OnMeasureItem = UnitsListBoxMeasureItem Style = lbOwnerDrawFixed TabOrder = 1 end @@ -92,9 +92,9 @@ object UseUnitDialog: TUseUnitDialog AnchorSideLeft.Control = Owner AnchorSideBottom.Control = SectionRadioGroup Left = 12 - Height = 19 - Top = 310 - Width = 93 + Height = 20 + Top = 308 + Width = 115 Anchors = [akLeft, akBottom] BorderSpacing.Left = 6 BorderSpacing.Around = 6 @@ -106,7 +106,7 @@ object UseUnitDialog: TUseUnitDialog AnchorSideLeft.Control = Owner AnchorSideTop.Control = Owner Left = 6 - Height = 23 + Height = 29 Top = 6 Width = 351 OnAfterFilter = FilterEditAfterFilter diff --git a/ide/useunitdlg.pas b/ide/useunitdlg.pas index 3d0e11c9df..e95387b4db 100644 --- a/ide/useunitdlg.pas +++ b/ide/useunitdlg.pas @@ -59,6 +59,8 @@ type ARect: TRect; State: TOwnerDrawState); procedure UnitsListBoxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); + procedure UnitsListBoxMeasureItem(Control: TWinControl; Index: Integer; + var AHeight: Integer); private UnitImgInd: Integer; FMainUsedUnits: TStringList; @@ -287,6 +289,13 @@ begin Key:=VK_UNKNOWN; end; +procedure TUseUnitDialog.UnitsListBoxMeasureItem(Control: TWinControl; + Index: Integer; var AHeight: Integer); +begin + if (AHeight <= IDEImages.Images_16.Height) then + AHeight := IDEImages.Images_16.Height + 2; +end; + procedure TUseUnitDialog.AddImplUsedUnits; var i, j: Integer;