diff --git a/designer/menueditorform.lfm b/designer/menueditorform.lfm index 1ba3a7bba3..0968f5be6e 100644 --- a/designer/menueditorform.lfm +++ b/designer/menueditorform.lfm @@ -15,31 +15,31 @@ object MenuDesignerForm: TMenuDesignerForm OnShow = FormShow Position = poScreenCenter ShowHint = True - LCLVersion = '1.7' + LCLVersion = '1.9.0.0' object LeftPanel: TPanel Left = 0 Height = 400 Top = 0 - Width = 219 + Width = 204 Align = alLeft AutoSize = True ClientHeight = 400 - ClientWidth = 219 + ClientWidth = 204 Constraints.MinHeight = 345 Constraints.MinWidth = 204 TabOrder = 0 object ButtonsGroupBox: TGroupBox AnchorSideRight.Side = asrBottom Left = 7 - Height = 104 + Height = 98 Top = 7 - Width = 205 + Width = 190 Align = alTop AutoSize = True BorderSpacing.Around = 6 Caption = 'ButtonsGroupBox' ClientHeight = 78 - ClientWidth = 201 + ClientWidth = 186 TabOrder = 0 object MoveItemUpButton: TSpeedButton AnchorSideLeft.Control = ButtonsGroupBox @@ -141,15 +141,15 @@ object MenuDesignerForm: TMenuDesignerForm object StatisticsGroupBox: TGroupBox AnchorSideRight.Side = asrBottom Left = 7 - Height = 138 - Top = 117 - Width = 205 + Height = 137 + Top = 111 + Width = 190 Align = alTop AutoSize = True BorderSpacing.Around = 6 Caption = 'StatisticsGroupBox' - ClientHeight = 112 - ClientWidth = 201 + ClientHeight = 117 + ClientWidth = 186 Color = clBtnFace ParentColor = False TabOrder = 1 @@ -159,9 +159,9 @@ object MenuDesignerForm: TMenuDesignerForm AnchorSideRight.Control = StatisticsGroupBox AnchorSideRight.Side = asrBottom Left = 12 - Height = 14 + Height = 15 Top = 6 - Width = 183 + Width = 168 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Around = 6 @@ -178,9 +178,9 @@ object MenuDesignerForm: TMenuDesignerForm AnchorSideRight.Control = StatisticsGroupBox AnchorSideRight.Side = asrBottom Left = 12 - Height = 14 - Top = 26 - Width = 183 + Height = 15 + Top = 27 + Width = 168 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Around = 6 @@ -197,9 +197,9 @@ object MenuDesignerForm: TMenuDesignerForm AnchorSideRight.Control = StatisticsGroupBox AnchorSideRight.Side = asrBottom Left = 12 - Height = 14 - Top = 46 - Width = 183 + Height = 15 + Top = 48 + Width = 168 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Around = 6 @@ -216,9 +216,9 @@ object MenuDesignerForm: TMenuDesignerForm AnchorSideRight.Control = StatisticsGroupBox AnchorSideRight.Side = asrBottom Left = 12 - Height = 14 - Top = 66 - Width = 183 + Height = 15 + Top = 69 + Width = 168 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Around = 6 @@ -235,9 +235,9 @@ object MenuDesignerForm: TMenuDesignerForm AnchorSideRight.Control = StatisticsGroupBox AnchorSideRight.Side = asrBottom Left = 12 - Height = 14 - Top = 86 - Width = 183 + Height = 15 + Top = 90 + Width = 168 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Bottom = 6 @@ -273,15 +273,15 @@ object MenuDesignerForm: TMenuDesignerForm AnchorSideRight.Control = LeftPanel AnchorSideRight.Side = asrBottom Left = 7 - Height = 72 - Top = 261 - Width = 205 + Height = 68 + Top = 254 + Width = 190 Anchors = [akTop, akLeft, akRight] AutoSize = True BorderSpacing.Around = 6 Caption = 'RadioItemGroupBox' - ClientHeight = 46 - ClientWidth = 201 + ClientHeight = 48 + ClientWidth = 186 TabOrder = 3 object GroupIndexLabel: TLabel AnchorSideLeft.Control = RadioItemGroupBox @@ -289,9 +289,9 @@ object MenuDesignerForm: TMenuDesignerForm AnchorSideRight.Control = RadioItemGroupBox AnchorSideRight.Side = asrBottom Left = 12 - Height = 14 + Height = 15 Top = 6 - Width = 183 + Width = 168 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Around = 6 @@ -305,9 +305,9 @@ object MenuDesignerForm: TMenuDesignerForm AnchorSideRight.Control = RadioItemGroupBox AnchorSideRight.Side = asrBottom Left = 12 - Height = 14 - Top = 26 - Width = 183 + Height = 15 + Top = 27 + Width = 168 Anchors = [akTop, akLeft, akRight] BorderSpacing.Left = 6 BorderSpacing.Around = 6 diff --git a/lcl/controls.pp b/lcl/controls.pp index 8a99d2d0e2..17f32a3220 100644 --- a/lcl/controls.pp +++ b/lcl/controls.pp @@ -336,6 +336,13 @@ type { TDragImageList } + TImageListHelper = class helper for TCustomImageList + private + function GetResolutionForControl(AImageWidth: Integer; AControl: TControl): TScaledImageListResolution; + public + property ResolutionForControl[AImageWidth: Integer; AControl: TControl]: TScaledImageListResolution read GetResolutionForControl; + end; + TDragImageList = class; TDragImageListResolution = class(TCustomImageListResolution) diff --git a/lcl/include/dragimagelist.inc b/lcl/include/dragimagelist.inc index 43032c52f3..7e61d09c97 100644 --- a/lcl/include/dragimagelist.inc +++ b/lcl/include/dragimagelist.inc @@ -281,4 +281,12 @@ begin RegisterDragImageListResolution; end; +{ TImageListHelper } + +function TImageListHelper.GetResolutionForControl(AImageWidth: Integer; + AControl: TControl): TScaledImageListResolution; +begin + Result := ResolutionForPPI[AImageWidth, AControl.Font.PixelsPerInch, AControl.GetCanvasScaleFactor]; +end; + // included by controls.pp